aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages/AbstractAttributeMapper.java
Commit message (Collapse)AuthorAge
* Add option to populate selector list in blaze query's proto output.Gravatar twerth2017-12-06
| | | | | | RELNOTES[NEW]: query: Add option --noproto:flatten_selects to turn off flattening of selector lists in proto output. PiperOrigin-RevId: 178106289
* Add getAttributeLocation to AttributeMap and related classes.Gravatar jcater2017-11-10
| | | | PiperOrigin-RevId: 175230893
* Expose late-bound-attributes to Skylark.Gravatar cparsons2017-11-06
| | | | | RELNOTES: Late-bound attributes are exposed to skylark. This is a new API (`configuration_field()`) to depend on certain configuration-defined targets from skylark rules. PiperOrigin-RevId: 174534104
* Automated rollback of commit 5d9e8c1062e893b8acadba52db92364950ce760c.Gravatar mschaller2017-10-26
| | | | | | | | | | | | | *** Reason for rollback *** Calling toString on value, when it's really a SelectorList, can result in an IllegalStateException. *** Original change description *** Improve error messaging for AbstractAttributeMapper RELNOTES: None. PiperOrigin-RevId: 173441312
* Improve error messaging for AbstractAttributeMapperGravatar cparsons2017-10-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 173315354
* Rephrase AbstractAttributeMapper#visitLabels such that we can avoid creating ↵Gravatar nharmata2017-04-05
| | | | | | | | 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
* Add detailed rule class/label info when report attribute checking error Gravatar Liangliang He2017-02-22
| | | | | | | | | | | 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
* Remove type checking requirement from AttributeMap.has.Gravatar Greg Estren2017-02-15
| | | | | | | | | | | | | | This overrides the traditional has(String name, Type<>T> type) with has(String name) and removes the type check outright from isConfigurable. Ideally we'd remove the old version in this same change. But there are enough uses of it that that's not a risk-free change and is safer as followup changes. -- PiperOrigin-RevId: 147513593 MOS_MIGRATED_REVID=147513593
* Be honest about type in Type#visitLabelsGravatar Michajlo Matijkiw2016-09-22
| | | | | | | | | | We avoided referencing Label directly, but as the code evolved it became inevitable. Also fix a typo I introduced earlier. -- MOS_MIGRATED_REVID=133831955
* Implement label visitation using visitorGravatar Michajlo Matijkiw2016-09-21
| | | | | | | | | As opposed to building up a collection. These collections, and all their iterators, add up creating a lot of garbage. This saves us at least an ImmutableList + Iterator per label. -- MOS_MIGRATED_REVID=133754998
* Some optimizations in Type#flatten (used under the covers by ↵Gravatar Nathan Harmata2016-08-25
| | | | | | | | | | | | | AggregatingAttributeMapper#visitLabels): -Rename Type#flatten to Type#extractLabels. -Change the return type of Type#extractLabels from Collection to Iterable. This way we don't need to create and concatenate large lists. -Add an internal-only Type#containsLabels so this way ListType and DictType can have efficient implementations of Type#extractLabels. Note that AggregatingAttributeMapper#visitLabels is called multiple times on the same in several different places during the lifetime of a non-incremental Blaze invocation (e.g. during Package loading, during transitive target visitation, etc) -- MOS_MIGRATED_REVID=131311698
* Allow Skyframe graph lookups and value retrievals to throw InterruptedException.Gravatar Janak Ramakrishnan2016-08-16
| | | | | | | The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer. -- MOS_MIGRATED_REVID=130327770
* Remove Rule's dependence on a RawAttributeMapper instanceGravatar Michajlo Matijkiw2016-07-21
| | | | | | | | | The things Rule needs it for aren't terribly complex. Instead inline functionality where sensible, and refactor into static methods where not. This reduces each Rule's memory footprint by 38%. -- MOS_MIGRATED_REVID=128011760
* Let select() "unset" values via: select({"//some:condition: None }).Gravatar Greg Estren2016-04-29
| | | | | | | | | | | | | | This not only uses the default value when applicable, but also causes ConfiguredAttributeMapper.isAttributeValueExplicitlySpecified to return false. Note the default value can come from two places: from the rule definition if specified, otherwise from the type default. RELNOTES[NEW]: select({"//some:condition: None }) is now possible (this "unsets" the attribute). -- MOS_MIGRATED_REVID=121029815
* Include real type in type casting error message.Gravatar Tobias Werth2016-02-16
| | | | | -- MOS_MIGRATED_REVID=114751682
* Make repository-local labels in visibility declarations actually be ↵Gravatar Lukacs Berki2016-01-13
| | | | | | | | | repository-local. Fixes #765. -- MOS_MIGRATED_REVID=112027627
* Permit proto serialization of configured attribute valuesGravatar Mark Schaller2016-01-04
| | | | | | | | | This commit adds proto messages that represent configurable values, and modifies attribute value serialization code to handle those values, which are called SelectorLists. -- MOS_MIGRATED_REVID=111149272
* Do not make labels without a specified repository in hidden attributes ↵Gravatar Lukacs Berki2015-12-14
| | | | | | | | | | | always point to the main repository. They now all point to @bazel_tools anyway, so there is no need. Fixes #700 (what a delightfully round bug number!) -- MOS_MIGRATED_REVID=110132857
* Shuffle around all the constants related to the name of the //external ↵Gravatar Lukacs Berki2015-12-10
| | | | | | | | | package and the prefix of external packages in the execroot. This is in preparation for renaming that path segment from "external" to "bazel-external" so that we can provide a symlink to it from the source tree so that the source tree looks like the execroot. -- MOS_MIGRATED_REVID=109882753
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | 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
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - 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
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Refactor Type.getLabels() so that instead of collecting labels, it flattens ↵Gravatar Lukacs Berki2015-09-17
| | | | | | | | | composite types and remove the mention of the type "Label" from the context argument of Type.convert(). This is in preparation of separating build-specific types and types inherent to Skylark. -- MOS_MIGRATED_REVID=103266869
* Do not consider //external: a repository-local reference.Gravatar Lukacs Berki2015-08-25
| | | | | | | Fixes #360. -- MOS_MIGRATED_REVID=101360551
* Move inline "visibility" PathFragment to a constantGravatar Michajlo Matijkiw2015-08-20
| | | | | | | No need to create one each time. -- MOS_MIGRATED_REVID=100918777
* Make default values of attributes point to the main repository.Gravatar Lukacs Berki2015-07-27
| | | | | | | Default values of attributes (e.g. "//tools/cpp:malloc" when an attribute declaration says .name("malloc").value("//tools/cpp:malloc")) are now considered as a label inside the main repository and not inside the external repository. This is consistent with how we treat implicit/default attributes and is useful because these are usually tool dependencies. -- MOS_MIGRATED_REVID=99160392
* Make absolute labels in remote repositories refer to the same repository by ↵Gravatar Lukacs Berki2015-07-07
| | | | | | | | | default. If we do otherwise, this makes it impossible to seamlessly move code from the main repository to another one, because if two targets (one depending another) were moved, the dependency edge would still point back to the main repository. -- MOS_MIGRATED_REVID=97650057
* Stop "no generating action" exceptions for configurableGravatar Greg Estren2015-06-19
| | | | | | | | | | | | | | | | | | | cc_library "srcs". The underlying problem is that Bazel determines whether or not to generate a .so by the contents of "srcs", but this happens in the loading phase before configurations are known. So, when "srcs" is configurable, it conservatively assumes a .so needs to be generated. In cc_library analysis, when the final values for "srcs" is properly bound, the .so may not actually be needed after all. This cl fixes the discrepancy by registering a FailAction for the .so under those circumstances - we don't actually need the .so anywhere but we still have to ensure it's registered with an owning action. -- MOS_MIGRATED_REVID=96405079
* Open source a few more analysis tests.Gravatar Ulf Adams2015-05-04
| | | | | -- MOS_MIGRATED_REVID=92715161
* Minimize calls to AggregatingAttributeMapper.visitAttribute. Attributes withGravatar Greg Estren2015-04-15
| | | | | | | | | multiple selects run the risk of exponential value growth, so we shouldn't request a full iteration of possible values unless that's really what the caller needs. -- MOS_MIGRATED_REVID=91118257
* Configurable attributes: support embeddable selects. With thisGravatar Greg Estren2015-04-14
| | | | | | | | | | | | | | | | change, the following syntax: deps = [':always'] + select({':a': [':adep'], ':b': [':bdep']}) or deps = select({':a': [':adep'], ':b': [':bdep']}) + select({':c': [':cdep'], ':d': [':ddep']}) works. -- MOS_MIGRATED_REVID=91016337
* PackageSerializer: include attributes with null values.Gravatar Greg Estren2015-03-26
| | | | | | | | | | | | PackageDeserializer: handle null-value attributes (single-value attributes with no value setting) without crashing. Without this change, attributes with computed defaults can crash on serialization because RawAttributeMapper.isNotNull isn't smart enough to check *indirect* configurable attributes that the computed attribute depends on. -- MOS_MIGRATED_REVID=89599145
* Remove "obsolete" and "default_obsolete" from the BUILD language.Gravatar Greg Estren2015-03-18
| | | | | | | | Anyone who needs this kind of functionality in the future can redefine it through user-defined constraints. -- MOS_MIGRATED_REVID=88871811
* AttributeMap#has(String, Type) is added to check whether an attribute with a ↵Gravatar Googler2015-03-13
| | | | | | | | | given name is present. Rule implementations are cleaned up. -- MOS_MIGRATED_REVID=88430329
* Include NODEP_LABEL in the set of attributes that are not reported as ↵Gravatar Janak Ramakrishnan2015-02-25
| | | | | | | dependencies of a target (along with outputs and NODEP_LABEL_LIST, which was just special because of visibility). -- MOS_MIGRATED_REVID=87180069
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957