| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rollback of commit cda4b4eae0c495a8f90f2a70a8db46e34062ee26.
*** Reason for rollback ***
Roll-forward with fixes (see ExternalPackageBuilder).
*** Original change description ***
Automated [] rollback of commit 178a3dfda8bf72abf22758597a90a4afb8eed181.
*** Reason for rollback ***
Broke ci.bazel.io.
See #1234.
*** Original change description ***
Allow modules to inject a custom AttributeContainer.
--
MOS_MIGRATED_REVID=122100417
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke ci.bazel.io.
See #1234.
*** Original change description ***
Allow modules to inject a custom AttributeContainer.
--
MOS_MIGRATED_REVID=121658474
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=121497233
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
|
|
|
|
|
|
| |
RELNOTES[NEW]: Skylark macros are now enabled in WORKSPACE file.
Design document at https://docs.google.com/document/d/1jKbNXOVp2T1zJD_iRnVr8k5D0xZKgO8blMVDlXOksJg/preview
Fixes #337
--
MOS_MIGRATED_REVID=108860301
|
|
|
|
|
|
|
|
| |
- Removed the exception
- Improved the comment
--
MOS_MIGRATED_REVID=104847927
|
|
|
|
|
|
|
| |
respective macro in the attribute "generator_location".
--
MOS_MIGRATED_REVID=104757928
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
- 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=103090380
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103004059
|
|
|
|
|
|
|
| |
BaseFunction.
--
MOS_MIGRATED_REVID=102988766
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make Environment-s freezable: Introduce a class Mutability
as a revokable capability to mutate objects in an Environment.
For now, only Environment-s carry this capability.
Make sure that every Mutability is revoked in the same function that create...
This reinstates a change that previously rolled-back because it broke the
serializability of SkylarkLookupValue. Bad news: serializing it succeeds for the
wrong reason, because a SkylarkEnvironment was stored as a result (now an
Environment.Extension) that was Serializable but inherited its bindings from an Environment (now an Environment.BaseExtension) which wasn't Serializable.
Apparently, Java doesn't try to serialize the bindings then (or at least doesn't
error out when it fails), because these bindings map variable names to pretty
arbitrary objects, and a lot of those we find in practice aren't Serializable.
Thus the current code passes the same tests as the previous code, but obviously
the serialization is just as ineffective as it used to be.
--
MOS_MIGRATED_REVID=102776694
|
|
|
|
|
|
|
| |
calling rule in the BUILD file.
--
MOS_MIGRATED_REVID=102487335
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks serialization of SkyValues.
--
MOS_MIGRATED_REVID=102457225
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make Environment-s freezable: Introduce a class Mutability
as a revokable capability to mutate objects in an Environment.
For now, only Environment-s carry this capability.
Make sure that every Mutability is revoked in the same function that creates it,
so no Environment is left open for modification after being created and exported;
exceptions for tests, the shell and initialization contexts.
Unify Environment, SkylarkEnvironment and EvaluationContext into Environment.
Have a notion of Frame for the bindings + parent + mutability.
Replace the updateAndPropagate mechanism by a dynamicFrame.
Simplify ValidationEnvironment, that is now always deduced from the Environment.
--
MOS_MIGRATED_REVID=102363438
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102332437
|
|
|
|
|
|
|
| |
attributes: generator_{function, name, location}
--
MOS_MIGRATED_REVID=102139196
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101798931
|
|
|
|
|
|
|
| |
attributes: generator_{function, name, location}
--
MOS_MIGRATED_REVID=101774632
|
|
|
|
|
|
|
| |
Fixes #241
--
MOS_MIGRATED_REVID=96573740
|
|
|
|
|
|
|
|
| |
This simplifies the code a little, and prepares for properly
serializing ExternalPackage.
--
MOS_MIGRATED_REVID=91673213
|
|
|
|
|
|
|
|
| |
This will allow thing in, say, jdk.WORKSPACE to be overridden in the main
WORKSPACE file.
--
MOS_MIGRATED_REVID=89030234
|
|
|
|
|
|
|
|
| |
This doesn't actually add any default workspace files, yet, but adds machinery
for them. Also did some cleanup/renaming.
--
MOS_MIGRATED_REVID=86085127
|
|
--
MOE_MIGRATED_REVID=85702957
|