[pull] master from bazelbuild:master#111
Merged
pull[bot] merged 19 commits intoMu-L:masterfrom Mar 17, 2021
Merged
Conversation
The code works, but the checked-for string can happen in different places. RELNOTES: None. PiperOrigin-RevId: 363156753
Thie method opts into using a minimalist builtins bzl environment containing no injected symbols. It is only intended for tests that don't use (directly or indirectly) any rules that could conceivably depend on builtins injection, e.g. tests of pure package loading machinery. Other changes: - Renamed getBuiltinsBzlRoot -> getBundledBuiltinsRoot, to distinguish it from non-bundled builtins roots (where the builtins root is overridden on the command line). - The type of this value was changed from Path to Root since that's what we usually want. - Added a getFileSystem() method to Root to avoid having to go through asPath(), which theoretically could be null. - Friendlier error message when --experimental_builtins_bzl_path=%workspace% is used on a rule class provider that's not set up for it. - Avoid requesting the repository mapping in BzlLoadFunction for builtins bzls. They don't need it, and it can create issues with Google-internal Skyframe heuristics. Work toward #11437. PiperOrigin-RevId: 363179217
Remove boiolerplate code initializing parameters for `org.junit.runners.Parameterized` runner. PiperOrigin-RevId: 363183685
This patch makes it so the `target_compatible_with` attribute can be
used with all non-workspace rules. The motivation here is to allow
rules like `filegroup` and `cc_import` to also make use of
incompatible target skipping. Even though these rules don't
inherently generate files that are incompatible with the target
platform, they can be used to provide incompatible files to other
targets. Before this patch the user had to do something like this to
create an incompatible pre-compiled library:
cc_import(
name = "foo_import",
shared_library = "foo.so",
)
cc_library(
name = "foo",
deps = [":foo_import"],
target_compatible_with = ["//:foo_platform"],
)
Now users can directly declare compatibility on the `cc_import` rule.
cc_import(
name = "foo_import",
shared_library = "foo.so",
target_compatible_with = ["//:foo_platform"],
)
Unfortunately, This does mean that some rules like `cc_toolchain` now
have a `target_compatible_with` that doesn't serve any purpose.
Before the changes in `BaseRulesClasses.java` the test would error out
with meesages like this:
//target_skipping:some_precompiled_library: no such attribute 'target_compatible_with' in 'cc_import' rule
//target_skipping:filegroup: no such attribute 'target_compatible_with' in 'filegroup' rule
I also took this opportunity to update the documentation a bit.
Fixes #12745
Closes #13170.
PiperOrigin-RevId: 363185186
This is in preparation for enabling layering check for `objc_library`. Layering check requires that a module map be generated. Currently, `objc_library` generates a module map to be used by `swift_library`. The two module maps are incompatible, so we migrate the swift one to its own action, freein Eventually, the module map needed by `swift_library` will be migrated to `swift_library`. I also had to switch `objc_import` so that it "compiles" its header and generates a module map. An external visible effect, however, is that `objc_import` will now have a `deps` attribute. PiperOrigin-RevId: 363185731
…atastrophic. There's definitely a Bazel bug, but we don't need to crash. File a bug report if any exceptions are not catastrophic, an additional one if *all* are not catastrophic, and continue to crash if there were no exceptions at all (because a cycle can't be catastrophic). Make bubbleErrorInfo sorted by insertion order so that iterating over it will tend to go from lower- to higher-level keys: should make for more sensible messages when we're in the buggy situation. PiperOrigin-RevId: 363192313
Some of the unit tests invoke the D8 desugar script with an explicit option for the configuration. Handle an explicit configuration option in the D8 desugar scripts by not passing the default configuration in that case. Don't allow multiple --desugared_lib_config options to the D8 desugar invocation Java binary. RELNOTES: None PiperOrigin-RevId: 363194875
This reverts dce861d, which was a mistake. It also removes a test which is now useless. There are no more build rules (which have the target_compatible_with attribute for target skipping) which also have toolchain resolution disabled, so this cannot be tested for. Fixes #12899 and undoes #13194. Closes #13223. PiperOrigin-RevId: 363200655
…ster/query.html). Also try to clarify the distinction between query and cquery. PiperOrigin-RevId: 363201726
Originally, a top-level BUILD file was thought to be needed to help locate the .bzl files, but the current BzlLoadFunction logic doesn't require this. Also, since we abandoned the idea of storing the production builtins files in the install base, we don't need it as an explanatory marker file for any users who go snooping around in there. This removes the BUILD.builtins file, which used to be renamed to BUILD in the builtins zip. It also replaces a symlink to it with a copy. Finally, the dummy builtins setup in CRCP.Builder is changed to not create it. Work toward #11437. PiperOrigin-RevId: 363203944
…file: report the final status to the user as coming from an IOException, not a "missing file." We still had the right failure detail, but the error message is misleading. Also print out top-level "missing input" failure messages in keep-going mode, not just no-keep-going. Noticed as part of this that there were no non-test callers of BuildFailedException#getRootCauses(), and got rid of it. Unfortunately, had to do that in this CL, since without the top-level printing in keep-going mode, we actually weren't ever printing those messages in some cases. PiperOrigin-RevId: 363204012
Guards against timing attacks to guess the cookie. PiperOrigin-RevId: 363210285
…ooling that has been updated to support AndroidX databinding generation. Updates Android remote tooling version to 0.21.0. Also updates list of desugar flags for new desugarer version included in the tools, and in particular remove usages of "--retarget_core_library_member", which the updated desugar tool no longer needs. PiperOrigin-RevId: 363212429
Before the fix, the test in this patch would error out with the
following message:
ERROR: ...: in args attribute of sh_test rule //target_skipping:foo_test: label '//target_skipping:some_foo3_target' in $(location) expression expands to no files
The problem was that the `RunfilesSupport` class for the
`RunfilesProvider` instance was computing the arguments as the
incompatible target was being constructed. That meant that the
arguments get evaluated and it would try to resolve things like
`$(location :incompatible_dep)`. That can't really succeed so bazel
would throw an error.
This patch makes it so arguments are ignored when constructing an
incompatible target.
Closes #13219.
PiperOrigin-RevId: 363233765
Pure refactoring drive-by. PiperOrigin-RevId: 363235598
This is an InMemoryFileSystem whose contents are guaranteed to not change during Skyframe evaluation. It produces fake, constant digest values, and ExternalFilesHelper identifies its files as FileType.BUNDLED rather than as external files. Work toward #11437. PiperOrigin-RevId: 363245300
We're well past the date we said we should delete it after. PiperOrigin-RevId: 363253057
Work toward #11437. PiperOrigin-RevId: 363257555
This allows RootCodecDependencies to take multiple likely Roots -- up to 255, although only one or two is expected. This is intended to allow efficient serialization of the bundled builtins root. Work toward #11437. PiperOrigin-RevId: 363274403
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )