| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
This exposes an issue with the new Skyframe-based implementation, which is
fixed here as well.
--
MOS_MIGRATED_REVID=113556169
|
|
|
|
|
|
|
| |
--
Change-Id: I86b90ff6eda6a16c2efeb8fffca301e2594c254e
Reviewed-on: https://bazel-review.googlesource.com/#/c/2784/
MOS_MIGRATED_REVID=113529297
|
|
|
|
|
|
|
|
| |
Add test coverage by re-running BuildViewTest with the new Skyframe loading
phase runner.
--
MOS_MIGRATED_REVID=113517509
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=113338481
|
|
|
|
|
|
|
| |
type-safety, we now must pass in the exception type of the callback.
--
MOS_MIGRATED_REVID=113313312
|
|
|
|
|
|
|
|
|
| |
Also add some TODOs for potentially improving package loading performance.
This CL has no semantic impact.
--
MOS_MIGRATED_REVID=113301656
|
|
|
|
|
|
|
|
|
| |
This should never be triggered in production, where we always run a loading
phase first and only analyze targets that load successfully. I.e., this is
just plumbing which will be hooked up in a subsequent change.
--
MOS_MIGRATED_REVID=113258593
|
|
|
|
|
|
|
|
|
|
|
| |
- if there are failed top-level aspects
- if there are conflicting actions
I ended up rewriting how errors are signaled from the SkyframeBuildView. I
think this is safe, but please review carefully.
--
MOS_MIGRATED_REVID=113150100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dependencies are the data structure which needs to propagate the configuration for each
aspect as created by trimConfigurations down to the point where it's actually used. We
need this to store different configurations for different aspects in a world where aspects
have their own configurations, which may have more fragments than the target they're
attached to.
That world is on its way.
Also in this CL:
* Refactor Dependency to be an abstract parent class with separate implementations for
Attribute.Transitions and BuildConfigurations, as well as null configurations, to avoid
having to check nullness in various places. Users of the API will not see this, but get
factory methods instead of constructors. As a consequence of this, refactor Dependency
to be its own top-level class instead of a nested class in DependencyResolver.
--
MOS_MIGRATED_REVID=113109615
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=112948493
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also match ConfiguredTargetFunction for target loading.
It isn't currently possible to trigger either of these code paths
- the loading phase ensures that we never attempt to analyze targets that fail
to load
- the Skylark import or conversion cannot fail, because Skylark checks during
.bzl execution that all referenced symbols are Skylark aspects
Therefore, the only way to trigger this would be if there was a native rule
requesting a non-existent or broken Skylark aspect for its dependencies, but
that is currently not possible - native rules can only request native aspects.
However, for interleaved loading and analysis, we need to limit the set of
exception classes that can be thrown from AspectFunction - we do that here
by changing the constructor of AspectFunctionException to only accept either
NoSuchThingException or AspectCreationException.
That in turn requires that we re-throw the Skylark import and conversion
exceptions as AspectCreationException, which is exactly what
TopLevelAspectFunction is already doing, and necessary for correct error
handling if we do ever support Skylark aspects in native rules.
Alternatively, I could change the code path to crash Bazel, but that seems
strictly worse. Even if we can't test this code, it's conceptually the right
way to handle these errors.
I'll move part of the error handling into loadSkylarkAspect in a subsequent
change.
--
MOS_MIGRATED_REVID=112938284
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main remaining problem with interleaved loading and analysis is error
handling. When interleaving, we don't run a real loading phase anymore, and
loading errors can occur during the analysis phase, and need to be handled
there.
The plan is to have ConfiguredTargetFunction throw a
ConfiguredValueCreationException with a list of all loading root causes, which
requires that we also catch ConfiguredValueCreationException here, which in
turn breaks analysis root cause handling, as that is currently relying on
Skyframe root cause tracking.
Moving analysis root cause handling into CTFunction makes it possible to
subsequently also implement loading root cause handling here. This is also
necessary if we want to have complete root cause handling in the general case:
a target may have any number (and combination) of loading and analysis root
causes at the same time.
For now, we only pass a single analysis root cause, which mirrors the current
Skyframe-based implementation.
--
MOS_MIGRATED_REVID=112930871
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that this can never happen in production - the loading phase ensures that
we only attempt to analyze targets that load successfully. That's also why
there are no tests for this.
This code path will become live in a later change, with corresponding test
coverage; the existing tests cover this in principle, we just need to make
them run with the reduced loading phase.
--
MOS_MIGRATED_REVID=112926211
|
|
|
|
|
|
|
|
|
| |
action fails, and propagate the exit code to BuildFailedException.
And update all call sites that copy or wrap ActionExecutionExceptions.
--
MOS_MIGRATED_REVID=112811857
|
|
|
|
|
|
|
|
|
|
|
| |
The WORKSPACE file AST is now parsed as a separate SkyFunction
and this will be used to have multiple SkyValue for the same
WORKSPACE file, splitting the execution of the AST after load
statements to enable load statement of external dependencies
in the WORKSPACE file.
--
MOS_MIGRATED_REVID=112768897
|
|
|
|
|
|
|
|
|
| |
--noimplicit_deps and/or --nohost_deps.
RELNOTES: --noimplicit_deps and --nohost_deps work correctly for Aspect attributes.
--
MOS_MIGRATED_REVID=112724917
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=112717648
|
|
|
|
|
|
|
| |
is a partial rollback of commit f1e257d because it turns out that loading sequentially can be a bottleneck.
--
MOS_MIGRATED_REVID=112628616
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=112561390
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=112507181
|
|
|
|
|
|
|
| |
all so that custom implementations can have custom options passed around.
--
MOS_MIGRATED_REVID=112502778
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- update some comments
- add some comments to make it easier to follow
- delete some dead code, in particular the SkyframeDependencyResolver can
never be null; remove an non-applicable @Nullable annotation
I'm trying to figure out how the error handling code works, in order to add
support for interleaved loading+analysis, which requires handling loading
errors in this code path.
--
MOS_MIGRATED_REVID=112456674
|
|
|
|
|
|
|
|
|
| |
to do such a load will result in a skyframe circular dependency exception.
As a side effect of this change, SkylarkImportFailedExceptions thrown by SkylarkImportLookupFunction are now caught by PackageFunction and wrapped and rethrown as a PackageFunctionException. Previously, the first exception wasn't caught, generating an uncaught exception error at top level.
--
MOS_MIGRATED_REVID=112328755
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is in preparation for moving the output dumping to the Reporter for
two reasons:
- we're currently relying on there being a Reporter which locks on itself;
i.e., this code is tightly coupled with the Reporter code
- the current Blaze output is confusing; we first print an info event, then
the actual output, and then an error event - putting the Reporter in control
allows us to fix that
--
MOS_MIGRATED_REVID=112240684
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, for some types of errors, you'd just see "WORKSPACE file
could not be parsed" if there was a syntax error (instead of what the
syntax error was).
Change-Id: Ia278cf23b79f8daba02917cdfb4cc515a87080b1
--
Change-Id: Ia278cf23b79f8daba02917cdfb4cc515a87080b1
Reviewed-on: https://github.com/bazelbuild/bazel/pull/774
MOS_MIGRATED_REVID=112190322
|
|
|
|
|
|
|
|
|
|
|
| |
statements work in remote repositories.
This work is somewhat sisyphean; the principled thing to do would be to just do this resolution when labels are parsed.
Fixes #783.
--
MOS_MIGRATED_REVID=112137996
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ConfiguredTargetFunction can only throw a NoSuch{Target,Package}Exception
if it's run for a non-existent target. However, it will never request a CT for
a non-existent target: all labels are run through DependencyResolver in order
to determine the configuration transition, which requires loading the target.
If it doesn't exist, the label is never returned from the DependencyResolver,
and errors are swallowed (we rely on the loading phase to report the error).
--
MOS_MIGRATED_REVID=112127012
|
|
|
|
|
|
|
| |
WalkableGraphFactory interface with a hook to inform the factory when the WalkableGraph is done being used.
--
MOS_MIGRATED_REVID=112074284
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
from the current package batch.
--
MOS_MIGRATED_REVID=111858978
|
|
|
|
|
|
|
| |
bazel server exits abruptly.
--
MOS_MIGRATED_REVID=111641619
|
|
|
|
|
|
|
|
|
| |
returning a ResolvedTargets set.
This is the second step in a series to allow processing large sets of targets in query target patterns via streaming batches rather than all at once. This should also be a functional no-op.
--
MOS_MIGRATED_REVID=111611858
|
|
|
|
|
|
|
| |
directory traversal and package loading, and the other which requests deps on all the transitive targets. We need values from the first half, but the second half can fail to evaluate because of a target cycle. By splitting them, we ensure that there will be values in the graph, so we can get the targets below a directory even if there are cycles present.
--
MOS_MIGRATED_REVID=111609889
|
|
|
|
|
|
|
|
|
| |
returning a ResolvedTargets set.
This is the first step in a series to allow processing large sets of targets in query target patterns via streaming batches rather than all at once. This should be a functional no-op.
--
MOS_MIGRATED_REVID=111609309
|
|
|
|
|
|
|
| |
graph. We can compute the universe target patterns outside of skyframe, which is the only reason we need the value we were requesting. Giving up was preventing us from evaluating "..." patterns even if the "..." pattern didn't contain any cycles itself.
--
MOS_MIGRATED_REVID=111605976
|
|
|
|
|
|
|
|
|
|
| |
Parsing was continuing and tried to load skylark extensions even
though an error was present in the WORKSPACE file.
Fixes #724
--
MOS_MIGRATED_REVID=111534382
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=111130363
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=110840166
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=110797095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
files in external repositories.
In addition:
- Cleaned up and refactored some tests to reflect the new loading behavior.
Deferred to future CLs:
- Updating Bazel Skylark documentation to reflect the new load form.
- Enabling command-line loading of Aspects via labels.
RELNOTES: Skylark load statements may now reference .bzl files via build labels, in addition to paths. In particular, such labels can be used to reference Skylark files in external repositories; e.g., load("@my_external_repo//some_pkg:some_file.bzl", ...). Path-based loads are now deprecated and may be disabled in the future. Caveats: Skylark files currently do not respect package visibility; i.e., all Skylark files are effectively public. Also, loads may not reference the special //external package.
--
MOS_MIGRATED_REVID=110786452
|
|
|
|
|
|
|
|
|
|
| |
I had to make a small change to ExternalFilesHelper. The Bazel test setup
creates a remote repository for the tools, so we always have external files,
incl. during loading. However, some of the tests don't setup an output
directory, but instead pass null, which would lead to a crash.
--
MOS_MIGRATED_REVID=110669993
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=110356954
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
external/ directory, i.e. were created by Bazel.
This avoids a cycle that arose when a file is load()ed from the WORKSPACE file that is reached through a symlink to an external directory:
* The WORKSPACE file depends on the package lookup node of the .bzl file
* The package lookup node (transitively) depends on wherever the symlink points
* The target of the symlink is an external file and as such, it depends on the WORKSPACE file
This will probably be, erm, interesting to solve when we get as far as to load stuff from external repositories in the WORKSPACE file, but we are just not there yet.
--
MOS_MIGRATED_REVID=110344658
|
|
|
|
|
|
|
|
|
| |
- If we have a class object available, we can use .cast(Object)
- Only store the required options objects in CppConfigurationParameters
rather than keeping the entire BuildOptions
--
MOS_MIGRATED_REVID=109981236
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
|
|
|
|
| |
package and the prefix of external packages in the execroot.
This is in preparation for renaming that path segment from "external" to "bazel-external" so that we can provide a symlink to it from the source tree so that the source tree looks like the execroot.
--
MOS_MIGRATED_REVID=109882753
|
|
|
|
|
|
|
| |
"overlaid BUILD files" hack in RepositoryValue.
--
MOS_MIGRATED_REVID=109877252
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular:
- Separate the implementation of maven_server into a RepositoryFunction and one that creates the MavenServerValue (ideally, maven_server wouldn't exist but we'll have to make to for the time being)
- Refactor the logic of determining whether an external repository needs to be re-fetched to RepositoryDelegatorFunction
- Make RepositoryFunctions not be SkyFunctions anymore (they are called from RepositoryDelegatorFunction, though, who *is* a SkyFunction)
- Add a Skyframe dirtiness checker that makes --nofetch RepositoryValues not be cached
- Add a bunch of test cases and javadoc
There is only one wart that I know of that remains: changes to BUILD files of new_* repository rules that weren't refetched when their RepositoryValue was initiall created on server restart won't take effect. This is because we don't add those BUILD files to the created RepositoryValue. This will fix itself once the ExternalFilesHelper refactoring is submitted.
--
MOS_MIGRATED_REVID=109768345
|