| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
constructing the package with an error.
Prior to this change, if a Package.Builder object was constructed, it was guaranteed that a Package (possibly with errors) would be created. This is no longer true: if an IOException is set on the Package.Builder object, it will throw a NoSuchPackageException during #build().
PiperOrigin-RevId: 161832111
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was originally included in runtime due to external dependencies, and
a desire to keep the options parser a general options library. These
dependencies have been or will be removed, and there are plenty of other
general flag libraries.
InvocationPolicy is fundamentally acting on the properties of this
specific OptionsParser and needs proper access to it for the proper
solution to a number of existing bugs, which means having access to
things that should be package private.
PiperOrigin-RevId: 158523111
|
|
|
|
|
|
|
| |
separate class. They're currently passed in around various callsites in the codebase and tests.
RELNOTES: None
PiperOrigin-RevId: 158139074
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157446717
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157378037
|
| |
|
|
|
|
|
|
|
|
|
| |
This gives us better reliability for detecting file changes; especially in
cases where tools intentionally do not update mtime.
Fixes #1525.
PiperOrigin-RevId: 155490849
|
|
|
|
| |
PiperOrigin-RevId: 155194438
|
|
|
|
|
|
|
|
|
| |
This is a standalone library for loading packages. It is intended to be used by clients outside of Bazel (for now, Kythe).
Perform BazelPackageLoader#loadPackage in the testing hook used in all of Bazel's unit tests and integration tests. This gives us very good test coverage for BazelPackageLoader.
RELNOTES: None
PiperOrigin-RevId: 155004070
|
|
|
|
|
|
|
|
|
| |
This is the first of two CLs for making command line options able to affect the Skylark interpreter. It introduces SkylarkSemanticsOptions, and stores it as a precomputed (injected) value in Skyframe. The next CL will read these options from Skyframe when constructing the Skylark environment.
This CL affects the dataflow from command/test initialization to Skyframe. Some code paths, like those used for testing, use the default SkylarkSemanticsOptions and therefore won't be able to use (for example) --incompatible_* flags. The call sites to update were found by searching for uses of defaultVisibility and working upward from there.
RELNOTES: None
PiperOrigin-RevId: 154432058
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 152882585
|
|
|
|
|
|
|
|
|
|
|
|
| |
'create' method.
This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment).
This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations.
RELNOTES: None
PiperOrigin-RevId: 152145768
|
|
|
|
|
|
|
|
|
| |
This is useful for IDEs and other tools utilizing command-line aspects
for reflection over build graph.
RELNOTES: None.
PiperOrigin-RevId: 152038248
|
|
|
|
|
|
|
|
| |
case-insensitive paths.
--
PiperOrigin-RevId: 151137308
MOS_MIGRATED_REVID=151137308
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 150467024
MOS_MIGRATED_REVID=150467024
|
|
|
|
|
|
|
|
| |
...now that the ExtendedEventHandler can serve the same purpose.
--
PiperOrigin-RevId: 148640618
MOS_MIGRATED_REVID=148640618
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With more specific information to be reported by Skyfunctions, e.g.,
to inform the build-event protocol on missing files, the EventHandler
interface is no longer enough. Therefore, provide an enriched context
for reporting events.
--
Change-Id: I2d06166fe4d5b9054e24ad8c752fafc039e3f9f8
Reviewed-on: https://cr.bazel.build/8794
PiperOrigin-RevId: 148463437
MOS_MIGRATED_REVID=148463437
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ActionEnvironmentFunction returns the list of environment
variable with the one overwritten by --action_env being
replaced. This let other Skyframe function declares
dependency to any value of the environment and being
influenced by the --action_env flag.
This will be used to declare dependency of remote repositories
on environment variables (step 3 of
https://bazel.build/designs/2016/10/18/repository-invalidation.html)
--
Change-Id: I1ed3fb6f48e8e17d4d64c903fccecb6ed7596350
Reviewed-on: https://cr.bazel.build/7974
PiperOrigin-RevId: 146918603
MOS_MIGRATED_REVID=146918603
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 146755491
MOS_MIGRATED_REVID=146755491
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove many calls from tests to SkyframeLabelVisitor.sync, which is generally
no longer necessary. In particular, BuildViewTestCase.ensureTarget(s)Visited
was calling it, so removing that, as well as simulateLoadingPhase.
I moved some tests for TransitiveTargetFunction to the corresponding test
class, where they belong. I also made sure that we have test coverage in the
BuildViewTest for some cases that were previously only tested with TTF. I
dropped some tests which no longer seem applicable / for which we have coverage
elsewhere.
Also, as a drive-by change, I fixed some warnings in BuildViewTestCase.
Note that TTF is only used for genquery and in an experimental code path, but
generally superseded by ConfiguredTargetFunction, which has taken over the
responsibility for loading in all other cases (and interleaves loading and
analysis).
Some of the tests are not externally visible yet.
--
PiperOrigin-RevId: 144813237
MOS_MIGRATED_REVID=144813237
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=139209942
|
|
|
|
|
|
|
|
|
|
|
| |
BUILD.
Fixes #552.
RELNOTES[NEW]: Packages are defined in BUILD.bazel as well as BUILD files.
--
MOS_MIGRATED_REVID=138828981
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding an options parameter to DiffAwareness#getCurrentView seems like the
simplest way to achieve that.
Alternatives considered:
1. Making the diff awareness modules stateful. However, I did not want to do so
as I've also been working on improving the module API to reduce state, or at
least to have a proper lifecycle management for any necessary state.
2. Making the watchFs flag a constructor parameter. However, that would also
invalidate any implementations that don't use the flag (of which we have
several).
3. Only passing in a single boolean flag instead of an options class provider;
however, this is a more principled, futureproof API, which allows other
modules / awareness implementations to use their own options.
RELNOTES: --watchfs is now a command option; the startup option of the same
name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs
build.
--
MOS_MIGRATED_REVID=136154395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Causes our integration tests on Darwin to time out
*** Original change description ***
Make --watchfs a common command option.
Adding an options parameter to DiffAwareness#getCurrentView seems like the
simplest way to achieve that.
Alternatives considered:
1. Making the diff awareness modules stateful. However, I did not want to do so
as I've also been working on improving the module API to reduce state, or at
least to have a proper lifecycle management for any necessary state.
2. Making the watchFs flag a constructor parameter. However, that would also
invalidate any implement...
***
--
MOS_MIGRATED_REVID=136070807
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding an options parameter to DiffAwareness#getCurrentView seems like the
simplest way to achieve that.
Alternatives considered:
1. Making the diff awareness modules stateful. However, I did not want to do so
as I've also been working on improving the module API to reduce state, or at
least to have a proper lifecycle management for any necessary state.
2. Making the watchFs flag a constructor parameter. However, that would also
invalidate any implementations that don't use the flag (of which we have
several).
3. Only passing in a single boolean flag instead of an options class provider;
however, this is a more principled, futureproof API, which allows other
modules / awareness implementations to use their own options.
RELNOTES: --watchfs is now a command option; the startup option of the same
name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs
build.
--
MOS_MIGRATED_REVID=136026835
|
|
|
|
|
|
|
| |
which cross into a sub-repository. Part of #1592.
--
MOS_MIGRATED_REVID=135931868
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In toolchains that support parse_headers, this is the desired action. For
other toolchains, this change makes blaze try to build a header-only library
which creates the error that the header only library is not a supported target
kind. Seems like either error message is not useful/actionable.
In theory, it would be better to actually analyze whether a parse_headers is
activated, but that requires refactoring a lot of code that is currently C++
specific.
--
MOS_MIGRATED_REVID=135554761
|
|
|
|
|
|
|
|
|
| |
PackageCacheOptions as a bundle.
This will allow me to thread a new flag through more easily in the future.
--
MOS_MIGRATED_REVID=134406676
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=133119463
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...to determine which actions have to be recomputed based on changes
to the client environment. Note that this change does it the simple way
and reconsideres all actions on a changed client environment, while still
only reexecuting those, where the part that was inherited from the environment
actually did change.
--
Change-Id: Ie1116d094642165e5e959447a6fcf49d19b37d6e
Reviewed-on: https://bazel-review.googlesource.com/#/c/5431
MOS_MIGRATED_REVID=133010705
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is now enabled by default, and this change removes the code path where
it's disabled.
Remove a few tests that were testing the removed code, and rewrite some others
that still seem useful. We still drop configured targets on configuration
changes, so we use that to check that things are dropped from Skyframe.
--
MOS_MIGRATED_REVID=132226208
|
|
|
|
|
|
|
| |
InterruptedException instead of wrapping as a TargetParsingException.
--
MOS_MIGRATED_REVID=130660310
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=129787305
|
|
|
|
|
|
|
| |
Also remove other uses of TestConstants.
--
MOS_MIGRATED_REVID=127327339
|
|
|
|
|
|
|
| |
making it easier to create PackageFactory instances in unit tests.
--
MOS_MIGRATED_REVID=124566862
|
|
|
|
|
|
|
| |
It works for both labels on the command-line and labels in BUILD files.
--
MOS_MIGRATED_REVID=123967347
|
|
|
|
|
|
|
|
|
| |
BlazeRuntime#getProductName() or a reference to TestConstants.PRODUCT_NAME for tests.
This CL prepares the codebase in order to delete the constant.
--
MOS_MIGRATED_REVID=122993568
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
incorrectly not being parsed as "//:blah").
Also add tests for parsing absolute labels in the empty package.
The empty package has been a thing in Bazel for a while now.
Note that the old error message in this case "couldn't determine target for filename 'blah'" was almost always misleading and unhelpful since we were (almost certainly incorrectly) assuming the user intended for 'blah' to be an input file in the empty package. Now the error message would be "no such target '//:blah'") which is similarly misleading and unhelpful but probably marginally less so. If we desire to improve this, a future cleanup can introduce smarter error messages.
--
MOS_MIGRATED_REVID=120566819
|
|
|
|
|
|
|
|
|
|
|
| |
In RecursiveDirectoryTraversalFunction, we must tolerate
NoSuchPackageException being thrown by subdirectories' nodes, since
that can happen in a nokeep_going build.
--
Change-Id: Id9a48256aa209775f27130186c58e03c788d20a9
Reviewed-on: https://bazel-review.googlesource.com/#/c/3392/5
MOS_MIGRATED_REVID=120081575
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=119942803
|
|
|
|
|
|
|
| |
Constants.DEFAULT_PACKAGE_PATH.
--
MOS_MIGRATED_REVID=118666575
|
|
|
|
|
|
|
| |
parsing for it is not broken.
--
MOS_MIGRATED_REVID=118654985
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it more with respect to the new parse_headers feature, ideas I have about
configurable attributes etc.
I am trying to keep functional changes to a minimum. Functional changes
that couldn't really be easily avoided:
- Find correct rule for headers through filegroups
- Find correct target to build even if sources are missing. A proper error is
reported in the subsequent loading phase
Also remove SrcTargetUtil as it is no longer used.
--
MOS_MIGRATED_REVID=118589517
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=117939121
|
|
|
|
|
|
|
|
| |
This is one of the last pieces of state in BlazeRuntime that isn't safe to
share across command invocations.
--
MOS_MIGRATED_REVID=117910631
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this would get thrown when referring to the same package
from both the main and default repositories:
java.lang.IllegalArgumentException: Multiple entries with same key: tools/cpp=/home/brian/971-Robot-Code and tools/cpp=/home/brian/971-Robot-Code
at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:136)
at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:98)
at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:84)
at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:295)
at com.google.devtools.build.lib.buildtool.BuildTool.transformPackageRoots(BuildTool.java:301)
at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:209)
at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:334)
at com.google.devtools.build.lib.runtime.commands.TestCommand.doTest(TestCommand.java:119)
at com.google.devtools.build.lib.runtime.commands.TestCommand.exec(TestCommand.java:104)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:371)
at com.google.devtools.build.lib.runtime.BlazeRuntime$3.exec(BlazeRuntime.java:1016)
at com.google.devtools.build.lib.server.RPCService.executeRequest(RPCService.java:65)
at com.google.devtools.build.lib.server.RPCServer.executeRequest(RPCServer.java:434)
at com.google.devtools.build.lib.server.RPCServer.serve(RPCServer.java:229)
at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:975)
at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:772)
at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:55)
And this would get thrown for any packages in the main repository loaded
from other repositories:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'PACKAGE:@//tools/build_rules/go/toolchain' (requested by nodes )
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:982)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:499)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Invalid BUILD file name for package '@//tools/build_rules/go/toolchain': /home/brian/bazel/tools/build_rules/go/toolchain/BUILD
at com.google.devtools.build.lib.packages.Package.finishInit(Package.java:299)
at com.google.devtools.build.lib.packages.Package$Builder.finishBuild(Package.java:1308)
at com.google.devtools.build.lib.skyframe.PackageFunction.compute(PackageFunction.java:501)
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:933)
... 4 more
Sponsor's comment: note the abundance of new Label.resolveRepositoryRelative() calls. They are ugly, but it's only making existing ugliness explicit. Yes, we should fix it, especially in the implementation of configurable attributes.
Refs #940
--
Change-Id: I8bd7f7b00bec58a7157507595421bc50c81b404c
Reviewed-on: https://bazel-review.googlesource.com/#/c/2591
MOS_MIGRATED_REVID=117429733
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=116058328
|
|
|
|
|
|
|
|
|
| |
instead of special-casing it.
This removes the need to deserialize artifacts in FdoSupport, which in turn removes the need to support artifact deserialization at all, which makes our lives simpler and Thoreauvian programming is good.
--
MOS_MIGRATED_REVID=115660698
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the CommandEnvironment to no longer create a LoadingPhaseRunner
eagerly. Unfortunately, that means we can't reuse the TargetPatternEvaluator
either. Fortunately, the SkyframeTargetPatternEvaluator is a very lightweight
class, which only contains the offset as state, so we just create a new
instance whenever we need one.
On the plus side, the LoadingPhaseRunner API is now stateless, and the
QueryCommand no longer creates a unnecessary LoadingPhaseRunner instance.
--
MOS_MIGRATED_REVID=114519731
|
|
|
|
|
|
|
|
|
|
|
| |
Instead, we simply introduce an error after the rule - that means the package
is in error, but the target still exists. I checked that this covers the
same code path that I wanted to cover in the original change.
Fixed #879.
--
MOS_MIGRATED_REVID=114443076
|