| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new PrepareAnalysisPhaseFunction, which started out as a copy of
some existing code from SkyframeExecutor, BuildView, AnalysisPhaseRunner,
AnalysisUtils, and ConfigurationResolver, which was then modified to work
inside Skyframe.
Most of our tests already work with the new code, except for some of the tests
related to configuration trimming in combination with dependency cycles. The
reason for this is that we can only recover from dependency cycles at the end
of a Skyframe invocation, but never inside a Skyframe invocation. The new code
therefore cannot return partial results like the old code.
This seems to make null builds a bit faster. In my testing, I saw null build
times for a single test target go from ~50ms to ~40ms. This is probably due to
slightly better caching - it seems that computing the configuration transitions
and top-level targets is non-negligible, even if there's only a single
top-level configuration for a single top-level target.
This might be an even bigger win if there are a lot of top-level targets and
configurations.
PiperOrigin-RevId: 207083192
|
|
|
|
|
|
| |
full mapping unless requested. This gets rid of any performance issue for the vast majority of builds. Second, if requested, use a custom data structure so that we don't have to create a full HashSet for artifacts whose only owning labels are their own owner labels.
PiperOrigin-RevId: 206610370
|
|
|
|
|
|
|
|
|
|
|
| |
Instead, refactor the code to use TargetPatternPhaseValue exclusively. This
removes the need to convert from TargetPatternPhaseValue to LoadingResult, and
prepares for interleaving.
It also reduces the number of Skyframe calls which may speed up null builds a
bit, as a followup for https://github.com/bazelbuild/bazel/commit/1067310e18cb9ac203110726de0be53bdc403cea.
PiperOrigin-RevId: 205989338
|
|
|
|
|
|
|
|
| |
available.
The owning labels are the labels of the top-level configured targets that requested this artifact to be built (there may be many such targets). In cases where the artifact is added not through a configured target (build-info artifacts and coverage artifacts), the label of the artifact's owner is used.
PiperOrigin-RevId: 204432951
|
|
|
|
|
|
|
| |
Fixes #5246
RELNOTES: None.
PiperOrigin-RevId: 203453340
|
|
|
|
|
|
|
| |
To start we add just a single metric, the number of actions constructed in the current build.
RELNOTES: None
PiperOrigin-RevId: 201248490
|
|
|
|
|
|
| |
This is in preparation for interleaving config creation with loading+analysis.
PiperOrigin-RevId: 200695071
|
|
|
|
|
|
|
| |
Move the testing class to the tests tree. This is in preparation for
dismantling BuildView and merging the relevant parts into AnalysisPhaseRunner.
PiperOrigin-RevId: 200532794
|
|
|
|
|
|
| |
package lookups to get Targets.
PiperOrigin-RevId: 200452642
|
|
|
|
|
|
|
| |
This is in preparation for dismantling BuildView and merging the relevant
parts into AnalysisPhaseRunner.
PiperOrigin-RevId: 200391088
|
|
|
|
| |
PiperOrigin-RevId: 200363345
|
|
|
|
|
|
|
|
| |
invalidate the BUILD_INFO_KEY node on --workspace_status_command and related flag changes. Instead, the action has a supplier that allows it to retrieve the correct values at execution time.
This does not sacrifice correctness because the action executes unconditionally on every build, so it will never have stale data.
PiperOrigin-RevId: 200265375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
repository name is remapped.
For example if main/WORKSPACE contains:
local_repository(
name = "a",
path = "../a",
repo_mapping = {"@x" : "@y"},
)
a/BUILD
load("@x//:sample.bzl", "sample")
Then the load in a/BUILD will be resolved as "@y//:sample.bzl"
RELNOTES: None
PiperOrigin-RevId: 200227431
|
|
|
|
|
|
| |
We now track Causes instead of plain Labels, which will allow us to do better reporting in the future. Add basic tests.
PiperOrigin-RevId: 198380468
|
|
|
|
| |
PiperOrigin-RevId: 198053509
|
|
|
|
|
|
|
|
|
| |
Use update() and other methods which properly respect the trimming
transition over those which don't. Avoid using the target configuration
if the configuration actually used by a target is available.
RELNOTES: None.
PiperOrigin-RevId: 196588405
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 194607978
|
|
|
|
|
|
|
|
|
|
| |
This brings BuildView's test configured target methods in closer
to the real thing, and makes tests behave better.
In particular, it enables trimming transitions to work.
RELNOTES: None.
PiperOrigin-RevId: 194586030
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 194433721
|
|
|
|
|
|
|
|
|
|
| |
This RuleTransitionFactory will be applied to all targets after other
transitions, and is intended to be used to manually trim the configuration
based on tagging of that target. This is a stopgap feature until automatic
trimming of configuration can be implemented.
RELNOTES: None.
PiperOrigin-RevId: 193573013
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 191861074
|
|
|
|
|
|
|
|
|
| |
These have all had a chance to be categorized with the OptionDocumentationCategory enum, and the help output already uses the enum-grouped format.
The "incompatible changes" category has meaning for --all_incompatible_changes and will be removed separately.
RELNOTES: None.
PiperOrigin-RevId: 190773778
|
|
|
|
|
|
| |
ConfiguredTarget#getConfiguration(). Add convenience methods in four Java test classes for use by refactoring tools to do this#getConfiguration(ConfiguredTarget) instead of ConfiguredTarget#getConfiguration.
PiperOrigin-RevId: 190684008
|
|
|
|
|
|
|
|
| |
methods, TransitiveInfoCollection#getConfigurationKey() and ConfiguredTarget#getConfigurationChecksum(). These methods currently delegate to #getConfiguration(), but in the future they won't. I hope to get rid of #getConfigurationChecksum(), but I may have to fold the checksum into BuildConfigurationValue.Key or leave it as a separate field in ConfiguredTarget.
Transform a representative (random?) selection of #getConfiguration calls, to show that it's pretty much possible everywhere.
PiperOrigin-RevId: 190474978
|
|
|
|
|
|
| |
from the provided defaults in Options classes. These are used to create BuildOptionsDiffForReconstruction, which lets us store only the diffs in our BuildConfigurationValue.Keys.
PiperOrigin-RevId: 190117455
|
|
|
|
|
|
| |
rename some methods that were still called ConfiguredTargetAndTarget. Move some tests over to using ConfiguredTargetAndData instead of calling ConfiguredTarget#getConfiguration() directly.
PiperOrigin-RevId: 189642264
|
|
|
|
|
|
| |
labels instead of the entire toolchain context since that's all the dependency resolver really needs. This will help make cquery transitions outputter easier to implement.
PiperOrigin-RevId: 189342812
|
|
|
|
|
|
|
| |
This change ensures that there is no duplicate aspect in AnalysisResult.
RELNOTES: None
PiperOrigin-RevId: 189086095
|
|
|
|
|
|
| |
ConfiguredTargetAndData. We want to get BuildConfiguration out of ConfiguredTarget because it uses >800K when serialized.
PiperOrigin-RevId: 188600002
|
|
|
|
|
|
| |
RELNOTES:
Removed flag `--incompatible_load_argument_is_label`.
PiperOrigin-RevId: 187479614
|
|
|
|
|
|
|
| |
them with getConfiguredTargetAndTarget() so we can get rid of
ConfiguredTarget.getTarget() callers. This should be a test only change.
PiperOrigin-RevId: 184877255
|
|
|
|
| |
PiperOrigin-RevId: 183859414
|
|
|
|
| |
PiperOrigin-RevId: 183826311
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the need for ConfigurationTransitionProxy.DATA by providing a
way for the C++ rule defs to directly inject the transition for all rules
to use.
Skylark attributes work differently, so they'll be addressed in another
change.
PiperOrigin-RevId: 183721293
|
|
|
|
|
|
| |
getting Target from the SkyframeExecutor's PackageManager.
PiperOrigin-RevId: 183710251
|
|
|
|
|
|
|
| |
This option has no effect, so don't give documentation readers false hope.
Change-Id: Ibbc0d2f62375fd146fedaa113a39027bd7d65d6c
PiperOrigin-RevId: 183240947
|
|
|
|
|
|
|
|
| |
BuildConfiguration.Fragment>> set of Fragment classes that is part of the BuildConfigurationValue.Key. This class allows us to compute a fingerprint of the wrapped ImmutableSortedSet, making equality comparisons fast. The number of additional wrapper objects is the number of distinct sets of fragment classes, so 1. (In fact, we don't even need to compute a fingerprint, since reference equality does the job for us here, but we do it just to be conservative.)
This CL has a performance benefit for Bazel currently, but has a bigger performance benefit in the following changes, where there are more BuildConfigurationValue.Key objects to compare.
PiperOrigin-RevId: 183090122
|
|
|
|
|
|
|
|
| |
ImmutableSortedSet wherever possible, and use a known explicit ImmutableSortedSet in the case of two sets being equal. This is mainly a cosmetic cleanup for the sequel changes.
Also rename test-only methods in SkyframeExecutor to indicate that, and do a drive-by clean-up of a test that reported hard crashes confusingly because it wrapped RuntimeExceptions.
PiperOrigin-RevId: 182984572
|
|
|
|
|
|
|
|
| |
BaseRuleClasses.DYNAMIC_TRANSITION_MAP.
This leaves DATA as the last remaining legacy transition.
PiperOrigin-RevId: 182422552
|
|
|
|
|
|
|
|
|
|
|
|
| |
container, ConfiguredTargetAndTarget, that can be used to access Targets, and deprecate ConfiguredTarget#getTarget. ConfiguredAndTargetObjects are intended to be limited in scope, not being persisted to Skyframe.
The eventual plan is to remove the target field from ConfiguredTarget.
This CL is mostly straightforward, except for dealing with AliasConfiguredTargets, which cause some complications.
A significant cleanup is still needed before #getTarget can be removed, but I don't see any impossible blockers. We will may still need to store a Target-like object in ConfiguredTarget (that has the RuleClass, or at least a string representation of it, for instance), but that will let us avoid storing a full Target together with its associated Package.
PiperOrigin-RevId: 182371566
|
|
|
|
|
|
| |
removing the layer of indirection of getting SkyKey out of ActionLookupKey, which uses more memory for no reason.
PiperOrigin-RevId: 181658615
|
|
|
|
|
|
|
| |
HostTransition can't be migrated yet because it depends on
BuildConfiguration.
PiperOrigin-RevId: 180842784
|
|
|
|
|
|
| |
conveniently also makes it unnecessary to pass the entire LoadingResult when doing configured queries post analysis.
PiperOrigin-RevId: 180676481
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
config.transitions.ConfigurationTransitionProxy.
The "proxy" part is to dissuade people from writing:
void myfunc(ConfigurationTransition transition)
signatures casually.
Maybe that's actually a better name than "Transition". But I'd rather
rename Transition to ConfigurationTransition in its own change if we
want to do that.
PiperOrigin-RevId: 180285321
|
|
|
|
| |
PiperOrigin-RevId: 179936355
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 179838936
|
|
|
|
|
|
|
|
|
|
|
| |
If an aspect is applied to a rule+aspect node, all attributes are merged
into ctx.rule.attr collection, and the first one with the same name wins
(in particular, rule attribute will always win over aspect attribute).
This is backwards-compatible, and unlikely to cause problems in
practice.
RELNOTES: Aspects-on-aspect see and propagate over aspect attributes.
PiperOrigin-RevId: 179675660
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 179468685
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 179046403
|
|
|
|
|
|
|
| |
1: Allow both in the same build (before, just one would trigger)
2: Don't check environment defaults from other groups, since neither
flag asserts any expectations on those groups
PiperOrigin-RevId: 178026699
|