Skip to content

[pull] master from bazelbuild:master#111

Merged
pull[bot] merged 19 commits intoMu-L:masterfrom
bazelbuild:master
Mar 17, 2021
Merged

[pull] master from bazelbuild:master#111
pull[bot] merged 19 commits intoMu-L:masterfrom
bazelbuild:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Mar 16, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

larsrc-google and others added 6 commits March 16, 2021 04:56
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
@pull pull bot added the ⤵️ pull label Mar 16, 2021
sgjesse and others added 13 commits March 16, 2021 09:02
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
@pull pull bot merged commit b77b866 into Mu-L:master Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants