| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint.
Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon.
RELNOTES: None.
PiperOrigin-RevId: 188098079
|
|
|
|
| |
PiperOrigin-RevId: 188078054
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Fixed issue that led to rollback.
RELNOTES: None
*** Original change description ***
Automated rollback of commit eee53d3a33dde441f7e7adaecde81ef2d3db7c1b.
*** Reason for rollback ***
breaks Blaze_CorpTest
*** Original change description ***
@AutoCodec ConfiguredTargetValue.
PiperOrigin-RevId: 187869560
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
breaks Blaze_CorpTest
*** Original change description ***
@AutoCodec ConfiguredTargetValue.
PiperOrigin-RevId: 187783702
|
|
|
|
| |
PiperOrigin-RevId: 187635570
|
|
|
|
|
|
|
|
| |
calculation, so we don't have to have the whole package.
Memory increase should be minimal because there aren't that many environment groups, but it's further minimized by breaking an inner class UnpackagedEnvironmentGroup out of EnvironmentGroup. Previously, each EnvironmentGroup cost 40 bytes (24 bytes for first three fields, 8 for next two, 8 for last field because of alignment). Each UnpackagedEnvironmentGroup costs 32 bytes (4 fields), while the EnvironmentGroup now costs 24 bytes. So a loss of 16 bytes per EnvironmentGroup: shouldn't be noticeable.
PiperOrigin-RevId: 185837140
|
|
|
|
|
|
| |
are needed, so just use that.
PiperOrigin-RevId: 185738140
|
|
|
|
|
|
| |
Replace it with PackageManager.getTarget().
PiperOrigin-RevId: 183736074
|
|
|
|
|
|
| |
Preparatory step for removing ConfigurationTransition.HOST.
PiperOrigin-RevId: 179838374
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the main barrier to making host transitions routine
patch transitions.
Today you signify a host transition by calling
Attribute.Builder.cfg(ConfigurationTransition.HOST). Blaze's
configuration machinery auto-converts this to
HostTransition.INSTANCE, which is a patch transition.
This change provides the groundwork for removing
ConfigurationTransition.HOST and removing the special conversion
logic. This also paves the way for better API support for
multiple host configurations.
Also change some cfg(HOST) rule references to
cfg(HostTransition.INSTANCE).
PiperOrigin-RevId: 179754619
|
|
|
|
| |
PiperOrigin-RevId: 179748374
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
constraint checking.
Fixes #4042.
Change-Id: I9461c004ab1aab8ca7a0ad515e8a9f24c8a489a5
PiperOrigin-RevId: 175219823
|
|
|
|
|
|
|
|
| |
Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own.
This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually.
PiperOrigin-RevId: 175033526
|
|
|
|
|
|
|
|
| |
Adds a legacy flag so clients can continue to use both
experimental_auto_cpu_environment_group and auto_cpu_environment_group until
uses can be cleaned up.
PiperOrigin-RevId: 172470616
|
|
|
|
|
|
| |
This is a trivial change with a large file footprint.
PiperOrigin-RevId: 169169864
|
|
|
|
|
|
|
| |
Exempt RuleConfiguredTarget in this change because that's liable to touch
a billion files.
PiperOrigin-RevId: 168929827
|
|
|
|
|
|
|
| |
This is part of splitting up the build-base library into separate libraries for
analysis, exec, and rules.
PiperOrigin-RevId: 164446955
|
|
|
|
|
|
|
|
|
|
| |
We don't yet have a SKIPPED test status. So for now we report
"NO STATUS".
Also moved top-level constraint checking to its own file,
since its logic is getting more complicated.
PiperOrigin-RevId: 162790879
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assuming "all" fulfills "foo", these should be exactly the same (and
maybe we should trigger a redundant listing error). In practice, it's
possible to make the first case succeed while the second fails because of
environment refining and lack of static constraint checking for selects.
See changes for details.
Also refactor ConstraintSemantics.checkConstraints to divide and conquer more clearly.
PiperOrigin-RevId: 158047217
|
|
|
|
|
|
|
|
| |
a temporary Type.LabelVisitor instance per Attribute being visited. Instead, we can now create one temporary object per visitation. Getting rid of this dimension of scaling reduces the amount of garbage created.
RELNOTES: None
PiperOrigin-RevId: 152161836
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently label-type attributes are detected in many places across the
codebase by simply reference-comparing against each of the label types.
This CL aims to generalize most of these cases, moving the encoding of
this logic into a single place (Type/BuildType itself). Not all of these
cases can be made general without further refactoring, and some perhaps
shouldn't be - serialization and Skylark rule context, for example, need
to do exotic things based on the type. But most sites can avoid having to
enumerate all the types they work with explicitly.
This causes LABEL_DICT_UNARY to start being treated like the other label
types, which means that CcToolchainSuiteRule and JavaRuntimeSuiteRule
need to include a set of allowed file types (none, in their case).
Skylark will continue treating it as a dictionary from String to Label
in its rule context, however, to avoid visible behavior changes.
--
PiperOrigin-RevId: 147471542
MOS_MIGRATED_REVID=147471542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks Skylark aspects running over rules with LABEL_DICT_UNARY attributes.
*** Original change description ***
Refactoring: Types report what class of labels they contain.
Currently label-type attributes are detected in many places across the
codebase by simply reference-comparing against each of the label types.
This CL aims to generalize most of these cases, moving the encoding of
this logic into a single place (Type/BuildType itself). Not all of these
cases can be made general without further refactoring, and some perhaps
shouldn't be - serialization and Skylark rule context, for example, need
to do...
--
PiperOrigin-RevId: 147385072
MOS_MIGRATED_REVID=147385072
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently label-type attributes are detected in many places across the
codebase by simply reference-comparing against each of the label types.
This CL aims to generalize most of these cases, moving the encoding of
this logic into a single place (Type/BuildType itself). Not all of these
cases can be made general without further refactoring, and some perhaps
shouldn't be - serialization and Skylark rule context, for example, need
to do exotic things based on the type. But most sites can avoid having to
enumerate all the types they work with explicitly.
This causes LABEL_DICT_UNARY to start being treated like the other label
types, which means that CcToolchainSuiteRule and JavaRuntimeSuiteRule
need to include a set of allowed file types (none, in their case).
--
PiperOrigin-RevId: 147175424
MOS_MIGRATED_REVID=147175424
|
|
|
|
|
|
|
|
|
|
| |
See OutputFileConfiguredTargetTest for deep details.
Also more strongly enforce the expectation that all output files have generating rules.
--
PiperOrigin-RevId: 143570028
MOS_MIGRATED_REVID=143570028
|
|
|
|
|
|
|
|
|
|
| |
Null generating rules shouldn't actually happen. That's its own bug that
needs its own attention. This change is just a workaround to prevent
NullPointerExceptions when the bug hits.
--
PiperOrigin-RevId: 141329624
MOS_MIGRATED_REVID=141329624
|
|
|
|
|
|
|
|
|
| |
This makes is easier to understand and change which attributes are checked.
Also turn off checking for "data" and java_* "resources" attributes.
--
MOS_MIGRATED_REVID=140771015
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
supported environments get refined away by incompatible
select paths.
This is a fix of TODO:
https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/constraints/ConstraintSemantics.java#L597
Old message:
ERROR: /workspace/foo/BUILD:3:1: in cc_binary rule //foo:main: all environments have been refined out of the following groups: //buildenv:environment_group
New message:
ERROR: /workspace/foo/BUILD:3:1: in cc_binary rule //foo:main: the current command-line flags disqualify all supported environments because of incompatible select() paths:
environment: //buildenv:gce removed by: //util/lib:some_dep_with_select (/workspace/util/lib/BUILD:12:1)
--
MOS_MIGRATED_REVID=125788804
|
|
|
|
|
|
|
|
|
|
| |
instead of passing and checking null in all helpers.
Demonstrates this pattern usage in a few select rules (e.g. AndroidBinary) where this was particularly egregious.
There are many places which can benefit from this pattern -- this change doesn't try to fix them all at once.
--
MOS_MIGRATED_REVID=123012378
|
|
|
|
|
|
|
| |
which was removed in c231574.
--
MOS_MIGRATED_REVID=121974686
|
|
|
|
|
|
|
| |
supportsJava7TargetEnvironment
--
MOS_MIGRATED_REVID=121150741
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=120540937
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=120539626
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements most of a design proposal that splits constraint checking
into two pieces: *static* checks, which apply the standard constraint checking
done today, and *refined* checks, which selectively prune environments based
on select paths and check that not every environment gets pruned out.
As a result of this change, dependencies like:
java_library(
name = "lib",
restricted_to = [":A", ":B"],
deps = select({
":config_a": [":depA"],
":config_b": [":depB"],
}))
java_library(
name = "depA",
restricted_to = [":A"])
java_library(
name = "depB",
restricted_to = [":B"])
are allowed.
Specifically, even though neither "depA" nor "depB" supports [":A", ":B"], the combination of the two does. So the select as a whole supports all environments declared in lib, even though only one of those environments actually gets chosen for a given build.
Refinement makes lib "match" the chosen path. So for "config_a" builds, lib's environment set is "refined" down to [":A"], meaning [":B"]-restricted rules cannot depend on it. Likewise, for "config_b" builds, lib's environment set is "refined" down to [":B"], meaning [":A"]-restricted rules cannot depend on it. This guarantees that the restrictions imposed by the chosen select path propagate faithfully up the dependency chain.
See new documentation in ConstraintSemantics.java for more details.
--
MOS_MIGRATED_REVID=120464241
|
|
|
|
|
|
|
| |
The TransitiveInfoProvider already contains a label, use that instead.
--
MOS_MIGRATED_REVID=120443298
|
|
|
|
|
|
|
|
|
|
| |
This variable is no longer used because the docgen template directly calls
RuleDocumentationAttribte.getSynopsis() instead of using the SYNOPSIS variable,
and RuleDocumentationAttribute.getHtmlDocumentation() resolves the SYNOPSIS
variable to the empty string.
--
MOS_MIGRATED_REVID=113249993
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=112717648
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
|
|
|
|
|
|
| |
attributes that would otherwise be skipped by
default policy.
This is the simplistic start to a user-controllable
enforcement policy API.
--
MOS_MIGRATED_REVID=106530210
|
|
|
|
|
|
|
|
|
|
|
| |
The headers were modified with
`find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'`
And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan.
The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand.
--
MOS_MIGRATED_REVID=103938715
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103768073
|
|
|
|
|
|
|
|
|
|
| |
- Label parsing can be simplified
- lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things
This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change.
--
MOS_MIGRATED_REVID=103527877
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103374106
|
|
|
|
|
|
|
|
|
| |
Before this change, constraints considered implicit deps anything from an attribute beginning with "$" or ":" (e.g. attributes that are completely hidden from BUILD files). Query agrees with this, but it also counts default values for *normal* attributes that aren't explicitly set in rules.
By syncing the two up, depot migrations can figure out which rules need to be constraint-annotated by simply running a bazel query --no_host_deps --no_implicit_deps.
--
MOS_MIGRATED_REVID=95766777
|
|
|
|
|
|
|
| |
classes that are exempt from constraint checking.
--
MOS_MIGRATED_REVID=95033646
|
|
|
|
|
|
|
| |
even with --nodistinct_host_configuration.
--
MOS_MIGRATED_REVID=95009095
|
|
|
|
|
|
|
| |
dependencies.
--
MOS_MIGRATED_REVID=91801043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reflection, and saves ~15% of initialization time in []RuleClassProvider.create().
Before change:
Over 14 samples,
average = 976
median = 969.9
After change:
Over 14 samples,
average = 811.5
median = 813.9
--
MOS_MIGRATED_REVID=89036261
|
|
|
|
|
|
|
| |
in
--
MOS_MIGRATED_REVID=88869446
|