| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
| |
...by making TargetParsingCompleteEvent an instance of BuildEvent. The main
value of this event on the event stream is that it is now know which actual
targets to expect.
--
Change-Id: I50b16f825d742d28e719692489de701d16195efa
Reviewed-on: https://bazel-review.googlesource.com/#/c/6278
MOS_MIGRATED_REVID=135661452
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
The first legacy glob that a package requires will, if this option is enabled, cause up to that many directories to be eagerly visited by a glob(['**']). The results are thrown away for memory reasons.
--
MOS_MIGRATED_REVID=135148361
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
now to forbid it, since Skyframe lookups are interruptible.
--
MOS_MIGRATED_REVID=130429286
|
|
|
|
|
|
|
| |
The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer.
--
MOS_MIGRATED_REVID=130327770
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
execroot change
This is in prep for making the execution root path for external repositories
../repo_name (instead of external/repo_name). Right now, the getRunfilesPath() returns that path, so that is renamed getExecRoot() (since the runfiles are really just a reflection of the execRoot structure). getSourceRoot() replaces getPathFragment, which has always been a confusing name (it's not clear from the name
what the difference is between it and getPackageFragment()). It returns the relative path to source files for external repositories (external/repo_name).
Also renamed/moved to more sensible class a few static RepositoryName fields.
--
MOS_MIGRATED_REVID=128594419
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The execution root currently uses the basename of the workspace directory for
the workspace name, not the name in the WORKSPACE file. (For example, if our
sources were in /path/to/foo and our WORKSPACE file had workspace(name = "bar"),
our execution root would look like execroot/foo.)
This creates a symlink bar -> foo, so that accessing ../repo_name actually works
for the main repository.
RELNOTES[INC]: The main repository's execution root is under the main
repository's workspace name, not the source directory's basename. This shouldn't
have any effect on most builds, but it's possible it could break someone doing
weird things with paths in actions.
--
MOS_MIGRATED_REVID=128175455
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=125160288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
repositories
One interesting side effect of how this is implemented is that for external
repositories, bin/ and genfiles/ are combined. External repo output is under
bazel-out/local-fastbuild/repo_name for each repo.
Fixes #1262.
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions.
--
MOS_MIGRATED_REVID=125095799
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=124600066
|
|
|
|
|
|
|
| |
preparation for there not being a unique target configuration.
--
MOS_MIGRATED_REVID=124439969
|
|
|
|
|
|
|
| |
Constants.DEFAULT_PACKAGE_PATH.
--
MOS_MIGRATED_REVID=118666575
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
FileStateValues for output files can make their way into the Skyframe graph if a source file is symlink to an output file.
Also fix a bug where ExternalFilesHelper#isExternalFileSeen would always return true after returning true once in the past. This meant if an external file ever made its way into the Skyframe graph, we would always do a full graph scan at the beginning of each build (iow, we would always waste some CPU time doing nothing interesting).
--
MOS_MIGRATED_REVID=118190190
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=117452774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
all packages were successful.
Also add Preconditions check to ensure we get the expected Package response when retrieving packages in bulk when we know the set of Package identifiers correspond to valid packages.
--
MOS_MIGRATED_REVID=116580093
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
confusingly it only worked on "blaze query".
--
MOS_MIGRATED_REVID=115338436
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
tests. Replace it in tests with direct Skyframe graph lookups.
--
MOS_MIGRATED_REVID=114335937
|
|
|
|
|
|
|
|
| |
The TargetParsingCompleteEvent was posting the post-expansion targets, and the
LoadingPhaseCompleteEvent was missing the test-suite targets.
--
MOS_MIGRATED_REVID=114312273
|
|
|
|
|
|
|
|
| |
Also fix a bug in the LoadingPhaseRunner - we weren't printing an error for
failed targets, duh!
--
MOS_MIGRATED_REVID=114310591
|
|
|
|
|
|
|
|
| |
This was the last implementation of the interface, so we don't really need
the interface anymore. Also add a comment not to use this class.
--
MOS_MIGRATED_REVID=114099495
|
|
|
|
|
|
|
|
| |
In the interleaved case, loading errors can occur during configuration creation
and we need to correctly report such errors in that case.
--
MOS_MIGRATED_REVID=113826273
|
|
|
|
|
|
|
|
|
| |
Moved RepositoryValue to RepositoryDirectoryValue so that it could be cached
(and not re-downloaded) even if the WorkspaceAST caused a Skyframe restart
(as mentioned in https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java#L130-L133).
--
MOS_MIGRATED_REVID=113358489
|
|
|
|
|
|
|
|
|
|
| |
As it's about to get more important in its own right.
The only change that isn't just moving code around is making
RepositoryName.validate package-private.
--
MOS_MIGRATED_REVID=112956571
|
|
|
|
|
|
|
|
| |
This is in preparation of implementing dependency filtering correctly
for aspects.
--
MOS_MIGRATED_REVID=112721440
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=112717648
|
|
|
|
|
|
|
|
|
| |
TargetPatternKey, since that is what is needed by callers.
Also, since the PathFragments come from packages, they are guaranteed to be well-formed, so the checks we were doing were unnecessary.
--
MOS_MIGRATED_REVID=112059930
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=111130363
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
|
|
|
|
| |
Fixes #352.
RELNOTES: Files in external repositories are now treated as mutable, which will make the correctness guarantees of using external repositories stronger (existent), but may cause performance penalties.
--
MOS_MIGRATED_REVID=109676408
|
|
|
|
|
|
|
|
|
| |
attributes. This might not be the correct behavior in the long run, but it seems like a much better choice
compared to completely ignoring configurable attributes.
--
MOS_MIGRATED_REVID=108778853
|
|
|
|
|
|
|
|
| |
This is in preparation for adding a Skyframe-based implementation that uses
the recently added TargetPatternPhaseFunction.
--
MOS_MIGRATED_REVID=106920157
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106839024
|
|
|
|
|
|
|
|
| |
It's unclear if the method is still necessary with Skyframe, but I don't want
to investigate in detail right now.
--
MOS_MIGRATED_REVID=106838896
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106838787
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106836859
|
|
|
|
|
|
|
| |
build.lib.
--
MOS_MIGRATED_REVID=106689603
|
|
|
|
|
|
|
|
|
| |
since root causes are associated with top-level targets and labels, and the filter is for all top-level targets and labels.
I noticed this when a huge --noanalyze build spent most of its time in filtering here. The passed-in "collection" was a list, which meant that we could have sped it up by using a set, but why not just get rid of it all.
--
MOS_MIGRATED_REVID=105536485
|
|
|
|
|
|
|
| |
Ideally, PrepareDepsOfPatternFunction and maybe even RecursivePkgFunction would also be changed to take a PackageIdentifier instead of RootedPath because the less places we store the set of roots, the better, but I've done enough refactoring in the past weeks to not be thrilled by the idea of doing more.
--
MOS_MIGRATED_REVID=105486561
|
|
|
|
|
|
|
|
| |
This is currently not hooked up, and we're passing (potentially) massive
numbers of targets around.
--
MOS_MIGRATED_REVID=105395404
|
|
|
|
|
|
|
|
| |
Also change the semantics to create a new one on every call; inject the offset
where we were previously relying on hidden state in the SkyframeExecutor.
--
MOS_MIGRATED_REVID=104188580
|
|
|
|
|
|
|
|
| |
Now that we have an EventHandler everywhere, we can just use the bridge code
to call into the usual PackageManager.
--
MOS_MIGRATED_REVID=104098660
|
|
|
|
|
|
|
| |
This means we no longer need an event handler on the object itself.
--
MOS_MIGRATED_REVID=103982299
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only implementation of TransitivePackageLoader at this point is in
SkyframeLabelVisitor, which by itself does not keep any state; it relies on
Skyframe to do all the caching.
Creating a new one per run should ensure that we don't accidentally keep state
there, and also reduces memory consumption (a little), because it can now be
garbage collected after the loading phase. As a side effect, we no longer need
to create an instance if we're using the simplified loading phase.
--
MOS_MIGRATED_REVID=103979794
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This limits the exposure of LoadedPackageProvider, such that there will be
no regressions in the use of getLoadedTarget. Unfortunately, fully removing
LoadedPackageProvider is more work than I'm willing to take on right now, and
this is the cleanest intermediate solution I could come up with.
This unblocks my other work (removing SkyframeExecutor.errorEventHandler).
Someone else will have to shave this yak.
--
MOS_MIGRATED_REVID=103943375
|