This project is mirrored from https://github.com/bazelbuild/bazel.git.
Pull mirroring updated .
- Oct 19, 2024
-
-
Rostislav Rumenov authored
ICP is one of the biggest Rust open source repositories using bazel. Closes #24025. PiperOrigin-RevId: 687427480 Change-Id: Ie340064b714987f4d9aace58dbd5a1f6876d492b
-
Googler authored
The toolchain context of the aspect is currently used to configure the dependencies of the base target, which is incorrect and results into a number of issues due to missing execution groups or different ones being picked up. This CL modifies `AspectFunction` to always prepare the `baseTargetUnloadedToolchainContexts` and pass it to `PrerequisiteParameters`. `PrerequisiteParameters#baseTargetUnloadedToolchainContexts` is then used for the target's dependencies while `PrerequisiteParameters#toolchainContexts` continues to be used for the aspect owned dependencies. The base target toolchains and execution groups will not be available in the aspect implementation function via `ctx.rule.toolchains` and `ctx.rule.exec_groups` unless the aspects path propagates to toolchains. PiperOrigin-RevId: 687376763 Change-Id: I78167bab7f8648e5855178d5dbcc3fcb02357a38
-
- Oct 18, 2024
-
-
Googler authored
PiperOrigin-RevId: 687311869 Change-Id: I2f481f7a702494691093bf91905fbb28f309a482
-
Googler authored
Removing this assumption makes it possible to put something into the default MODULE.bazel, generated by setup_module_dot_bazel. In my case, I'll use this to temporarily patch rules_java and protobuf so that they don't cause additional unnecessary downloads. Some tests assumed that MODULE.bazel was empty and deleted its content. Other tests needed empty MODULE.bazel, and assumed it already was. I believe this change is generally useful, when we need to do some patching. PiperOrigin-RevId: 687256923 Change-Id: Id0a5f25676c0ad8992737a37dfe9acaf573f1d35
-
Alexandre Rostovtsev authored
Fixes https://github.com/bazelbuild/bazel/issues/16496 Closes #24019. RELNOTES: The stripPrefix parameter of repository_ctx.download_and_extract() and repository_ctx.extract() has been renamed to strip_prefix; the deprecated stripPrefix name remains usable for compatibility. PiperOrigin-RevId: 687224164 Change-Id: Iffaba2e65c049a2ff8bb98d1fba52e0bba9e5a02
-
Googler authored
PiperOrigin-RevId: 687111838 Change-Id: Ifb804d115aa0adec833287e67f44c519080c299b
-
Dimi Shahbaz authored
Remove word to fix grammar issue. Closes #24018. PiperOrigin-RevId: 687041869 Change-Id: I2802ea9f6ddb1503f48e9c1f5f78d2446954ca3f
-
Googler authored
When switching to cpp linking variables, we need to modify the Apple rules to ensure that -Wl,-rpath,/usr/lib/swift appear before other rpaths. But we still need to leave behind that rpath in swift rules for linking rules that don't use apple rules (e.g. cc_binary). The side effect is that the are now more Appler linker warning about duplicate rpaths for simple targets. I don't know of a way to turn that off, and since we already have logic to deduplicate frameworks, let's deduplicate rpaths while we're at it. PiperOrigin-RevId: 687016661 Change-Id: Iba80b5690121ba90453e461057167d0920eafa5f
-
Tony Aiuto authored
The external repository test depends on a .tgz file which would be downloaded from another repo. I think that when whomever made the original test, they just copied six-1.0.0.tar.gz to the test data. But the test does not actually care about what the repo does. It only cares that it can unload it and inject a BUILD file. This PR replaces that tarball with a trivial equivalent. This does not impact the bazel distribution size, it just means we have one less false dependency. Fixes: #18272 Closes #23875. PiperOrigin-RevId: 686978582 Change-Id: Id59be40caa6625e6bd39d36cef108ee15b3a8d9e
-
- Oct 17, 2024
-
-
Googler authored
Previously we weren't creating input files for labels used in the attribute of a top-level symbolic macro. This meant that if you wrote ``` my_macro( name = "foo", srcs = ["input.txt"], ) ``` you'd get an error message claiming that input.txt is not declared and requires an `exports_files()`. (The usages of input.txt by targets declared inside of foo don't count, because implicit input file creation only works for usages of labels outside of symbolic macro bodies.) This CL fixes this behavior, refactors the relevant logic in Package.java, and adds more test coverage. Package.java: - Factor the big for loop from `beforeBuild()` to `createAssumedInputFiles()`. Leave the original for loop in place for test suite accumulation, and pull the `if (discover...)` out of the new call. - Factor the meat of the logic into a helper, `maybeCreateAssumedInputFile()`, so we can reuse it for both rules and macros (previously there was no loop over references in macros). - Add tedious javadoc to this tedious logic. SymbolicMacroTest.java - Add explanatory comment to `macroCanReferToInputFile()`. - Expand `macroCannotForceCreationOfImplicitInputFileOnItsOwn()` to check that the target is still not created when the inner usage is in an attr of a MacroInstance rather than a Rule. PackageFactoryTest.java - Expand comment in `testSymbolicMacro_macroPreventsImplicitCreationOfInputFilesUnderItsNamespace()`, include coverage for when the reference comes from within a target or submacro inside the symbolic macro itself. - New test case for the behavior of this CL, `..._macroInstantiationCanForceImplicitCreationOfInputFile()`. - Drive-by: Add a test case for when a badly named target in a symbolic macro clashes with an implicitly created input file. This behavior may be affected by lazy macro evaluation in the future. Confirmed that this CL works for the case I originally discovered it on while writing examples documentation. Fixes #24007. PiperOrigin-RevId: 686919555 Change-Id: I6313070f76456c0b0b5d5458ca35c89d1d6da33b
-
Googler authored
The watchdog is setup at the beginning of the analysis/execution phase, by listening to an event. It's then cleaned up at the end of the build, via a `finally` clause. If the build fails early enough in the analysis/execution phase, the cleanup code would win the race and be triggered before the watchdog was setup. PiperOrigin-RevId: 686852796 Change-Id: I736a17312c601c3720e2ac751d87357c3faec08f
-
Googler authored
Finishing touches for #4867. RELNOTES: None. PiperOrigin-RevId: 686819148 Change-Id: I9ff2424683b8579ad5a953f7974c9579c5e715db
-
Googler authored
This change adds a "--quiet" startup option, which causes Blaze not to print any status messages, progress messages, info messages or warnings of any kind. Error messages are still emitted as usual. Fixes #4867. RELNOTES[NEW]: The "blaze --quiet" command line option can now be used to make Blaze emit much less output. PiperOrigin-RevId: 686784300 Change-Id: Ibaa0b6a1788b43863337dce6fc16da09defb6724
-
Googler authored
PiperOrigin-RevId: 686659518 Change-Id: I4a9de1ac4880ef1c5dd01e4b5bcb1538e69029af
-
- Oct 16, 2024
-
-
Fabian Meumertzheim authored
Fixes #21884 Fixes #23053 Closes #23215. PiperOrigin-RevId: 686518093 Change-Id: I1a6699b169fe4291ad0dda3be7e74f38c8e37bf1
-
Googler authored
PiperOrigin-RevId: 686495724 Change-Id: I07c07ec72cd461e74a0ec959d074abf4aaeaf7e6
-
Fabian Meumertzheim authored
Fixes #23981 Closes #23982. PiperOrigin-RevId: 686486627 Change-Id: I5f03b63601a535f8d551c005b00bf040846a324d
-
Googler authored
This really just exposes the existing LABEL_DICT_UNARY type that already exists in Java. Other than writing some boring conversion logic, all pieces fell together pretty pleasantly. Work towards #7989. That one calls for a string-to-label-list-dict type, but I'm planning to resolve that as WAI, since string-to-label-dict is close enough. RELNOTES: None. PiperOrigin-RevId: 686415025 Change-Id: Ib07ada7ab2ede95220ed1cc2d3569996fc4afb88
-
Googler authored
PiperOrigin-RevId: 686412821 Change-Id: I7c8410885474ef8aec6603468f32283178625f83
-
Googler authored
This required a number of somewhat awkward .toRelative() calls, but the alternative would have been to make IgnoredSubdirectories either have all absolute paths or all relative paths (both prefixes and inputs) and this one seemed simpler. Progress towards #7093. RELNOTES: None. PiperOrigin-RevId: 686411349 Change-Id: I62b0b7f12801e7b44b6e064893c1dc0cb282badb
-
Googler authored
In case of targets not using toolchain resolution, the evaluated `ToolchainCollection<UnloadedToolchainContext>` is set to null but it can also be null if its value is not evaluated and needs a Skyframe restart. This CL returns a boolean from `getBaseTargetUnloadedToolchainContexts` to make it clear when a Skyframe restart is needed. PiperOrigin-RevId: 686261289 Change-Id: Icb39aa89e212c39adff311341bc739e1f4b45223
-
Googler authored
When --enforce_project_configs is enabled for a valid --scl_config, do not allow any other flags to be set in the user blazerc (~/.blazerc or --blazerc) or command line. PiperOrigin-RevId: 686252332 Change-Id: I20a1de3a261b9b75141ebe1661ee08e6e6e732d3
-
Mislav Mandaric authored
This PR address the #23932 issue with remote downloader. Closes #23970. PiperOrigin-RevId: 686180819 Change-Id: Ia36c5793622bd1ac1fdaa9ef1326ddc385a5a01f
-
Googler authored
PiperOrigin-RevId: 686177057 Change-Id: Id998df883ce6d8c977799194b6a9a3ad23f406fb
-
Fredrik Medley authored
When cancelling an asynchronous repository download task, an interrupt signal is sent to the download thread. This doesn't mean that the download stops immediately. Avoid restarting a download until the previous download has actually stopped, so that the new download is able to clean old data without crashing (on Windows). Fixes #21773 Closes #23837. PiperOrigin-RevId: 686175953 Change-Id: I8d75f905b739d38b6cb430d5b5e84fda9a2d14e3
-
Googler authored
This is a more accurate name for the method, as it indicates that the node's version changed at the current version, regardless of whether its value changed. PiperOrigin-RevId: 686173970 Change-Id: I6502aa611e286dcca3bccf3cbb7712e7794cecc4
-
Googler authored
PiperOrigin-RevId: 686133746 Change-Id: I98c6f89a7e0ab09e1fb19919ff9ef3af6b9ba204
-
- Oct 15, 2024
-
-
Googler authored
Expose internal functions needed by multi_arch_binary_support.bzl and linking_support.bzl (both from builtins_bzl/common/objc/) via apple_common. This is inpreparation for moving the content of both bzl files to the repo in unknown commit. PiperOrigin-RevId: 686100272 Change-Id: Iadbe8da6a4335e30daca889cd19afcb627df2b5c
-
Googler authored
Progress towards #7093. RELNOTES: None. PiperOrigin-RevId: 686088272 Change-Id: I17ea2481ed58b76352ff1939b78ba93b8bdc9eac
-
Googler authored
Those are needed to remove proto rules from Bazel. Older version uses native.cc_proto_library in defs.bzl. Newer uses the rules from protobuf. Additional dep on cc_proto_library_bzl is needed because rules_python use @rules_cc//cc:defs.bzl, which depends on cc_proto_library_bzl. PiperOrigin-RevId: 686077918 Change-Id: Ie8ddfffd106a3e2be1a73a03dd27110064b6d917
-
Googler authored
Progress towards #9037. RELNOTES: None. PiperOrigin-RevId: 686074081 Change-Id: I919a452eb27d149b8e52c9c8188df294521fe347
-
Googler authored
This is needed to remove proto rules from Bazel. The automatic loading is disabled in unit tests. PiperOrigin-RevId: 686069253 Change-Id: I8a2e5751ab98f24be1dc5e7854a57f68a06a6323
-
Googler authored
It's simpler. Remove starlarkCcProtoAspect. It became unused. PiperOrigin-RevId: 686068336 Change-Id: Id796a274c937ec1d433a7e9d8952783e4ec8f67e
-
Googler authored
Document the valid options for `--experimental_build_event_upload_strategy` for Bazel users in the option's help string. In Bazel, this option may be either 'local' or 'remote'. Fixes #23789. RELNOTES: None. PiperOrigin-RevId: 686067559 Change-Id: Ib7fde8c1210dea25cce30eaf1613cf0130ba037c
-
Googler authored
Progress towards #9037. RELNOTES: None. PiperOrigin-RevId: 686063047 Change-Id: If27b64213ed51f0b5f8c361c657b9bba2d7511f6
-
Googler authored
Setup copying. This will make it possible to use rules implementation from @protobuf repository in the tests. Remove mocking of proto_lang_toolchain. It's not needed anymore Rename protobuf_workspace to third_party/protobuf. This make loads nicer. Keep mocking the rules. Tests are still using built-in rules and mixing them with @protobuf rules doesn't work well. Remove some other unnecessary mocks. Fix bazel_skylib to be imported in one go, instead of from the lib and rules directory. PiperOrigin-RevId: 686052269 Change-Id: I9e7bcbcd1ce42fd27e88e4e446e74e9aec1605f8
-
Googler authored
This is the mechanical part of the change. It's not, strictly speaking, necessary, but given that the that set of path fragments will not be interpreted as a set of path fragments soon, I think it's better to be explicit. An ancillary benefit is that now one can search for the new object to figure out which parts of the code handle the concept of "ignored subdirectories". Progress towards #7093 . RELNOTES: None. PiperOrigin-RevId: 686046437 Change-Id: I4191297c9b1e5a6599d4c5f8eb2c80fae14ac220
-
Googler authored
Before this change, returning non-Label's from a computed default for `label_list` attributes would crash Bazel (at a later point while visiting the labels). PiperOrigin-RevId: 685990009 Change-Id: I6b9c220a92f355d61c7340a6c383edc007f77be2
-
Googler authored
Record's implementation of hashCode and equals is inappropriate here due to the recursive nature of these types. Instead, use reference equality. These types are effectively interned via FileDependencyDeserializer anyway. PiperOrigin-RevId: 685830037 Change-Id: I00a28e80fa61805edd841f15391ea123c70af71e
-
Googler authored
PiperOrigin-RevId: 685784112 Change-Id: I7472b8789b5d14e8f0b898ab716eb4a22103d15f
-