| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 202360925
|
|
|
|
|
|
|
| |
ExecutionPlatformConstraintsAllowed set to PER_TARGET and also have an
alread-existing exec_compatible_with attribute.
PiperOrigin-RevId: 201238805
|
|
|
|
| |
PiperOrigin-RevId: 200247872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RuleClass.Builder now allows authors to specify whether a rule's targets
can add additional constraints on the execution platform, and to declare
additional constraints for all targets of that rule.
Targets which support this now have an attribute,
"exec_compatible_with", which supports specifying additional constraints
that the execution platform used must match.
This attribute is non-configurable. It will only affect execution
platforms used during toolchain resolution.
Part of #5217.
Change-Id: Id2400dbf869a00aa2be3e3d2f085c2850cd6dc00
Closes #5227.
Change-Id: If7d55f08f7f44bc7d7f6dfec86a3e6bcd68574b9
PiperOrigin-RevId: 199326255
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes are not equal.
Also validate that there are no tree and file artifacts with the same exec path.
Fixes #4668.
Closes #5284.
Change-Id: Id97c0407a476a5bfc697b4ca7b858e3d0c0f8c75
PiperOrigin-RevId: 198540425
|
|
|
|
|
|
|
|
| |
only being used for the transitive hash code and transitive label of its globals, which can be passed in explicitly.
Assert along the way that the transitive label of its globals is always non-null. That is currently the case, although there seems to be no hard invariant of the system that it is true. Might as well tighten it now.
PiperOrigin-RevId: 191103310
|
|
|
|
|
|
|
| |
vardef().
RELNOTES: None.
PiperOrigin-RevId: 190196933
|
|
|
|
|
|
|
| |
The only user of it was Android resource trimming, which just got deleted.
RELNOTES: None.
PiperOrigin-RevId: 190193627
|
|
|
|
|
|
| |
serialization to preserve the type when reconstituting the RuleClass.
PiperOrigin-RevId: 190015323
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
cycles when loading platforms.
Part of #4128.
Change-Id: Ie55a91aaaec15d8eb537f59131fc2e69a8f9c251
PiperOrigin-RevId: 176509311
|
|
|
|
|
|
|
|
|
|
|
| |
This adds two dump command, bazel dump --rules and bazel dump --skylark_memory.
dump --rules outputs a summary of the count, action count, and memory consumption of each rule and aspect class.
dump --skylark_memory outputs a pprof-compatible file with all Skylark analysis allocations. Users can then use pprof as per normal to analyse their builds.
RELNOTES: Add memory profiler.
PiperOrigin-RevId: 172558600
|
|
|
|
| |
PiperOrigin-RevId: 167896210
|
|
|
|
| |
PiperOrigin-RevId: 167861778
|
|
|
|
|
|
|
|
| |
Dynamic configs use RuleTransitionFactory instead.
Part of the static config cleanup effort.
PiperOrigin-RevId: 165590679
|
|
|
|
|
|
|
|
|
|
| |
This lets a parent choose a transition for its dep based
on the dep's rule class.
Implement (experimental) dynamic Android resource filtering
trimming with this.
PiperOrigin-RevId: 163259052
|
|
|
|
|
|
|
|
|
| |
Label or a ToolchainInfo provider.
Part of #2219.
Change-Id: Ia09070717f54eea10e1ab0303253714b58768548
PiperOrigin-RevId: 160995546
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157576492
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157446717
|
|
|
|
|
|
|
|
| |
Also expose both sides to Skylark.
Part of #2219.
Change-Id: I4d749dd9981fe33f75310acb0ec3927cff6f28fe
PiperOrigin-RevId: 156340638
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fa97703c1edf ("allow skylark implicit output callbacks to use the rule
name") fixed a limitation of the skylark implicit outputs by adding a
special case for "name" to the implicit outputs code. Later,
015e5954157a ("Remove special handling of name attribute") fixed the
general problem of "name" being a special case in the attribute
map. Therefore, we can remove my original fix. We may also excise an
older special case in the implicit outputs templating code.
Change-Id: I606c9decd98a8df492d2359abe540d3263f99fe1
PiperOrigin-RevId: 152974774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently ConfigSetting is treated specially; TransitiveTargetFunction
identifies it by name, then runs a special function on it. This change
makes ConfigSetting use a new options reference function in RuleClass,
which TransitiveTargetFunction will evaluate over the rule and use with
the options-to-fragments map to figure out which fragments are needed.
Although this is still a hack and not really a new feature on RuleClass,
this avoids a dependency on ConfigSettingRule from TransitiveTargetFunction,
which is necessary for ConfigSettingRule to be moved to rules/config.
RELNOTES: None.
PiperOrigin-RevId: 152156905
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BuildConfiguration currently depends directly on the name of a rule class
to see if it is config_setting. This creates a circular dependency between
ConfigSetting and BuildConfiguration.
As ConfigSetting is being moved to rules/config, this circular dependency
will no longer work. This replaces the name special case for a special
property of the rule class, which only config_setting should set.
RELNOTES: None.
PiperOrigin-RevId: 151871084
|
|
|
|
|
|
|
|
|
|
|
|
| |
This begins to allow for cases where a rule sets configuration
based on its attributes, such as where a rule attribute names
flags and their values - sort of a reverse select.
There are no such cases yet, but they're coming!
--
PiperOrigin-RevId: 150648357
MOS_MIGRATED_REVID=150648357
|
|
|
|
|
|
|
|
|
|
|
| |
This PR addresses comment by @gregestren in https://github.com/bazelbuild/bazel/pull/2531
Closes #2546.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/2546
PiperOrigin-RevId: 148201730
MOS_MIGRATED_REVID=148201730
|
|
|
|
|
|
|
|
|
|
| |
incoming edges if dynamic configurations are turned on.
This CL does not cover top-level nodes.
--
PiperOrigin-RevId: 144258789
MOS_MIGRATED_REVID=144258789
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143991903
MOS_MIGRATED_REVID=143991903
|
|
|
|
|
|
|
| |
The new provider gathers actions generated by any Skylark-based RuleConfiguredTarget, so long as the rule definition has _skylark_test=True set. For the moment this flag is under the user's control, but the intention is that it will be set by a test runner.
--
MOS_MIGRATED_REVID=134687396
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replaced late bound attributes with computed default attributes) with two bug fixes:
1. Unlike SkylarkComputedDefault, SkylarkComputedDefaultTemplate did not sort the names of its attribute dependencies. Consequently, lookup operations failed when callback functions in bzl files specified the names of their required attributes in a non-alphabetical order since the order of the key tuples was different (e.g. [1, 2] vs [2, 1]).
It would be less error prone to always sort the dependencies in createDependencyAssignmentTuple(), but this would impact performance.
2. SkylarkCallbackFunction ignores the legacy "cfg" parameter in callback functions. This special case should be deleted once all cfg parameters have been removed from the depot.
--
MOS_MIGRATED_REVID=132235927
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=132058819
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Motivation:
Compared to computed default attributes, late bound attributes are
evaluated in a later phase (analysis instead of loading phase). While
both mechanisms provide access to other attributes of a rule, only
late bound attributes additionally provide access to the build
configuration.
However, late bound attributes could be used to return new labels that
have not been loaded before. Since this happens in the analysis phase,
it can break one of Blaze's underlying principles, thus introducing a
serious correctness bug.
We decided to replace late bound attributes in Skylark with computed
default attributes since this moves the evaluation of values into the
loading phase, thus fixing this bug. Moreover, none of the existing
users of this mechanism required access to the build configuration,
which means that the user impact of this change is minimal.
Implementation details:
Unlike attributes of non-Skylark rules, however, Skylark computed
defaults need to be able to depend on more than two configurable
attributes since all attributes of Skylark rules are configurable by
default. This has two implications:
1. Unlike "normal" Skylark attributes, Skylark computed defaults need
to know about the existence of other attributes in order to declare a
dependency on them. This CL takes advantage of work previously done to
require parameter names to be the names of attributes used by the
computed default function.
2. Since Bazel computes the combinations of all possible attribute
values, a Skylark rule with a computed default that depends on a lot
of configurable attributes could crash Bazel. Consequently, this CL
also introduces an upper bound (64) for the number of valid
combinations.
Caveats:
1. Getting the depended-on attributes' names from function paramters is
mildly surprising.
Alternatives:
The best solution would be to keep SkylarkLateBound, but restrict it in
a way that it can only return already loaded labels. This is not
possible right now.
--
MOS_MIGRATED_REVID=131967238
|
|
|
|
|
|
|
| |
creating fresh Package instances. Also make a few Package methods public.
--
MOS_MIGRATED_REVID=123247246
|
|
|
|
|
|
|
|
|
| |
RuleClass is deserialized as part of a Skylark rule, the Environment is currently not present, but it is needed to detect changes to the rule.
Also precompute and store the Environment's hash code, and do a drive-by clean-up of a bunch of warnings in the Environment code.
--
MOS_MIGRATED_REVID=122838588
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=122635220
|
|
|
|
|
|
|
|
|
|
|
| |
bind() is assumed to be able to provide any provider. This is suboptimal, but beats the alternative of traversing the dependency graph to an arbitrary depth.
The reason for the removal of the iteration ability in TransitiveInfoCollection is that now aspects can be attached to BindConfiguredTarget, too, which is not a RuleConfiguredTarget. Whereas I could have implemented the iterator, it was used only in BindConfiguredTarget anyway, so there didn't seem to be much reason to.
Some work towards #952.
--
MOS_MIGRATED_REVID=120549877
|
|
|
|
|
|
|
| |
rolled back in commit 1250fdac4c7769cfa200af8b4f9b061024356fea. There was nothing wrong with that change.
--
MOS_MIGRATED_REVID=119756383
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
--
MOS_MIGRATED_REVID=119625653
|
|
|
|
|
|
|
| |
question, rather than during loading of the target's package. This way a target's package won't be in error if e.g. an unrelated target has empty 'srcs'.
--
MOS_MIGRATED_REVID=119079777
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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=114751682
|
|
|
|
|
|
|
|
|
|
|
| |
Native rule classes can provide default values for rules after they're
deserialized, so there isn't a need to serialize those default values.
This doesn't apply yet to rules with Skylark-defined rule classes, due
to the non-serializablity of Skylark rule classes.
--
MOS_MIGRATED_REVID=112066930
|
|
|
|
|
|
|
|
|
|
|
|
| |
versions:
devtools/build/lib/analysis/util/AnalysisTestCase.java
devtools/build/lib/analysis/util/BuildViewTestCase.java
devtools/build/lib/packages/util/PackageLoadingTestCase.java
devtools/build/lib/testutil/FoundationTestCase.java
--
MOS_MIGRATED_REVID=109560679
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=109079812
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first step toward giving aspects the ability to define their own
required configuration fragments, extracting the required configuration
metadata into a common place.
This should be a no-op refactoring.
--
MOS_MIGRATED_REVID=104249500
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
syntax that means "refer to the main repository".
There isn't an overarching plan for what we are going to do with the cmdline package, which seems to be separated from the .syntax one in all sorts of awkward ways.
--
MOS_MIGRATED_REVID=103088960
|
|
|
|
|
|
|
| |
BaseFunction.
--
MOS_MIGRATED_REVID=102988766
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102341264
|
|
|
|
|
|
|
|
| |
This is necessary to have TargetResolver depend on it without making it depend
on the packages target. First step of #389.
--
MOS_MIGRATED_REVID=101790345
|