| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: This specification currently does not have any effect, but soon...
In the default mode, when an aspect does not call any of the configuration
fragment methods on its AspectDefinition.Builder, the old behavior will
persist; aspects can only access fragments their associated rule has access
to, and have no guarantee as to what those fragments are.
This mode will become deprecated with a future CL.
If an aspect does call a configuration fragment method, it will have a
configuration fragment policy. In a future CL, this will mean it will be
restricted to accessing only those fragments, but will be understood as
requiring access to them for the purposes of dynamic configuration, even if
the rule it is attached to or created by does not otherwise require them.
Eventually, all aspects will be required to declare their configuration
fragments this way.
Skylark aspects may also declare configuration fragments as of this CL.
Two new parameters are added to the aspect() function, fragments and
host_fragments, mirroring the similar parameters for rules.
If both of these parameters are empty or unspecified, the default mode
is used, as with normal aspects.
Also in this CL:
* Minor javadoc fixes for AspectDefinition.
* Additional tests for AspectDefinition.
--
MOS_MIGRATED_REVID=112271713
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for allowing aspects to have their own configuration fragments
specified, allow ConfigurationFragmentPolicy.Builder to merge with built policies
more easily, setting up SetMultimaps in place of maps of sets. This changes how
named (Skylark) fragments are declared in the RuleContext builder, hopefully to
be a bit easier to write.
In order to do this, make SkylarkModuleNameResolver the only name resolver in use
(because it is the only name resolver which exists) so as to not worry about
collisions of different name resolvers.
This also changes isLegalConfigurationFragment's one-argument form to mean
"legal in ANY configuration" rather than "legal in the target (NONE)
configuration", as that is how it's used by TransitiveTargetFunction. Uses of it to
mean the latter have been revised to be more explicit.
Also in this CL:
* refactor ConfigurationFragmentPolicy to enforce its contracts about which
ConfigurationTransitions are legal
* use containsEntry or containsValue rather than looking in get(key) or values()
for the configuration fragment multimaps
* add tests for ConfigurationFragmentPolicy
* make SkylarkModuleNameResolver a static method
--
MOS_MIGRATED_REVID=112191439
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=110834841
|
|
|
|
|
|
|
| |
RELNOTES: Added ability to declare and use aspects in Skylark.
--
MOS_MIGRATED_REVID=110763176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies.
While we're here:
- Removed a couple of unused BUILD deps flagged in [].
- Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and
clarify the intent of the test.
--
MOS_MIGRATED_REVID=110360763
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=110356954
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=108964575
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=108779139
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=108777120
|
|
|
|
|
|
|
|
|
|
|
| |
1. attr.<type> functions return a wrapper object instead of
Attribute.Builder dierctly.
2. RuleClass is created once per the life-time of RuleFunction, during
export
3. Attributes are added to the RuleClass at exporting.
--
MOS_MIGRATED_REVID=108774581
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
internally. The load location for a Skylark Aspect is specified via a PathFragment, for consistency with current non-Aspect Skylark loads.
This should be a semantics-preserving change for users. In a subsequent CL, I'll change the Skylark syntax to allow load statements to use labels as well as paths, with the goal of eventually deprecating the latter.
Also:
- Removed the hack for handling relative loads in the prelude file.
- Refactored some redundant functionality in PackageFunction and SkylarkImportLookupFunction for handling loads.
- Removed the ability to put the BUILD file for the package containing a Skylark file under a different package root than the Skylark file itself. This functionality isn't currently used and is inconsistent with Blaze's handling of the package path elsewhere.
- Added BUILD files to a number of tests that load Skylark files; this is consistent with the requirement that all Skylark files need to be part of some package.
- Changed the constants used to set the location of the prelude file from paths to labels.
--
MOS_MIGRATED_REVID=107741568
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106848269
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106694515
|
|
|
|
|
|
|
|
| |
Use SkylarkList everywhere rather than either List or GlobList.
Keep a GlobList underneath a MutableList, where applicable.
--
MOS_MIGRATED_REVID=105864035
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=105844221
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Uses tests that don't run on Bazel
*** Original change description ***
Implement aspect(...) Skylark function.
--
MOS_MIGRATED_REVID=105808850
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=105596479
|
|
|
|
|
|
|
|
|
|
|
| |
tools repository.
This is a no-op refactoring CL. The actual switch will be made once everything passes with the new setup.
As a side cleanup, change the awkward realAndroidSdk() / realAndroidCrosstoolTop() mechanism to a converter.
--
MOS_MIGRATED_REVID=104649067
|
|
|
|
|
|
|
|
|
|
|
| |
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=103931317
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103741408
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103652672
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
via ctx.host_fragments.
--
MOS_MIGRATED_REVID=102490502
|
|
|
|
|
|
|
|
|
| |
*** 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
|
|
|
|
|
|
|
| |
attributes: generator_{function, name, location}
--
MOS_MIGRATED_REVID=102139196
|
|
|
|
|
|
|
|
| |
Move away global constants and global namespaces out of Environment
and into a new file Runtime.
--
MOS_MIGRATED_REVID=101940218
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101932897
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101798931
|
|
|
|
|
|
|
| |
attributes: generator_{function, name, location}
--
MOS_MIGRATED_REVID=101774632
|
|
|
|
|
|
|
|
|
| |
Have loadingPhase-only methods check that flag.
It's no use removing the initial bindings to these methods
when they may have been copied anyway.
--
MOS_MIGRATED_REVID=101624770
|
|
|
|
|
|
|
|
|
| |
generator_name and generator_function.
Additionally, both Skylark macros and build extensions set the attribute generator_location in order to store the name of the file where generator_function was defined.
--
MOS_MIGRATED_REVID=101458757
|
|
|
|
|
|
|
|
|
|
| |
The mechanism was easy to workaround (store the object in a different
variable) and a source of bugs. This affected only 'rule', 'native' and
'attr' objects. It turns out the blacklisting was not useful (native and
attr are already filtered, rule is not a problem).
--
MOS_MIGRATED_REVID=101359277
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks skylark macros that call skylark rules that declare an 'args'
attribute.
--
MOS_MIGRATED_REVID=101118137
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101015647
|
|
|
|
|
|
|
|
| |
submenus to sidebar, and expand and highlight the link for the current page.
Collapse sidebar on mobile and expose button for toggling sidebar.
--
MOS_MIGRATED_REVID=100836792
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=100163482
|
|
|
|
|
|
|
| |
--
Change-Id: I46ad9d609af088e473ec478729a0b1c79cdf72f3
Reviewed-on: https://bazel-review.googlesource.com/#/c/1761
MOS_MIGRATED_REVID=99707451
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99283744
|
|
|
|
|
|
|
|
|
|
|
|
| |
At this time, Skylark-defined rule classes don't get serialized, and
aren't available at package deserialization time. To allow packages
with Skylark-defined rule classes to deserialize, we provide a
placeholder rule class implementation for deserialized Skylark rules.
Resubmitting after previous rollback.
--
MOS_MIGRATED_REVID=97972209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[]*** Reason for rollback ***
Large number of newly broken targets found by []
*** Original change description ***
Provide placeholder rule class for deserialized Skylark rules
At this time, Skylark-defined rule classes don't get serialized, and
aren't available at package deserialization time. To allow packages
with Skylark-defined rule classes to deserialize, we provide a
placeholder rule class implementation for deserialized Skylark rules.
--
MOS_MIGRATED_REVID=97716849
|
|
|
|
|
|
|
| |
Remove some unused field warnings.
--
MOS_MIGRATED_REVID=97693607
|
|
|
|
|
|
|
|
|
|
| |
At this time, Skylark-defined rule classes don't get serialized, and
aren't available at package deserialization time. To allow packages
with Skylark-defined rule classes to deserialize, we provide a
placeholder rule class implementation for deserialized Skylark rules.
--
MOS_MIGRATED_REVID=97679963
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=97662036
|