-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support fetching CMake dependencies via `-Dprotobuf_FETCH_DEPENDENCIE…
…S=ON` This ports upb's WORKSPACE scraping logic to protobuf, and allows us to dynamically fetch our dependencies at the exact same pinned version as in Bazel via protobuf_FETCH_DEPENDENCIES=ON. This is mostly for development purposes, and is preferable to git submodules. In a later cl we will flip the default behavior to "package" #test-continuous PiperOrigin-RevId: 686265348
- Loading branch information
1 parent
2b0a414
commit d3735bc
Showing
14 changed files
with
266 additions
and
603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
load("@rules_python//python:defs.bzl", "py_binary") | ||
load("//upb/cmake:build_defs.bzl", "staleness_test") | ||
|
||
py_binary( | ||
name = "dependencies_generator", | ||
srcs = ["dependencies_generator.py"], | ||
) | ||
|
||
genrule( | ||
name = "generate_dependencies", | ||
srcs = ["//:MODULE.bazel"], | ||
outs = ["generated-in/dependencies.cmake"], | ||
cmd = "$(location :dependencies_generator) " + | ||
"$(location //:MODULE.bazel) $@", | ||
tools = [":dependencies_generator"], | ||
) | ||
|
||
staleness_test( | ||
name = "test_dependencies_staleness", | ||
outs = [ | ||
"dependencies.cmake", | ||
], | ||
generated_pattern = "generated-in/%s", | ||
tags = ["manual"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.