diff options
author | 2017-03-30 17:10:33 +0000 | |
---|---|---|
committer | 2017-03-31 17:09:12 +0200 | |
commit | 29bd56e3cd3eadd63abcc833c3075ecedfd2e9dc (patch) | |
tree | e1d84f7539a238d25d70c758c52bc58b7038622d /src/test/java/com/google/devtools/build/lib/rules/ToolchainTypeTest.java | |
parent | 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b (diff) |
Remove RuleContext from ResourceFilter state
The RuleContext object is not available when creating dynamic configuration
transitions. Removing it from ResourceFilter's state allows us to work with
ResourceFilter objects while creating those transitions. If we didn't do this,
we'd need to seperate the rest of ResourceFilter's state into a seperate class
so that we could work with it as part of doing dynamic configurations.
In the next reviews, I'll start actually creating dynamic configurations based
on ResourceFilter state.
Also, create a withAttrsFrom method that can be used in dynamic configuration
transitions, and generally migrate methods that work with attributes from
RuleContext to AttributeMap when practical.
To support these changes:
No longer keep the parsed lists of FolderConfiguration and Density objects as
fields of the ResourceFilter, instead, write functions that get them when
needed. We want to have access to a RuleContext when we initialize them to avoid
errors, and we don't have one in the withAttrsFrom method which will be called
as part of transitioning with dynamic configurations.
We no longer have those parsed lists to represent whether the object filters
during execution or analysis, so replace them with a seperate enum field for
filter behavior. Include a FILTER_IN_ANALYSIS_WITH_DYNAMIC_CONFIGURATION
option, even though it won't fully be used until the dynamic configuration
transition is taken advantage of in the next few reviews.
RELNOTES: none
PiperOrigin-RevId: 151715400
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/ToolchainTypeTest.java')
0 files changed, 0 insertions, 0 deletions