aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages/AggregatingAttributeMapper.java
Commit message (Collapse)AuthorAge
* 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
* 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
* Refine duplicate label checking for embedded selects. Before, we wereGravatar Greg Estren2015-05-15
| | | | | | | | | | | | | | | | | | | coarsely checking for duplicates *anywhere*, e.g.: select({':a': ['a.cc'], ':b': ['a.cc']}) + select({':a': ['b.cc'], ':b': ['b.cc']}) would fail. But this case is okay because these duplicates are in mutually exclusive select paths (so they could never appear together anyway). The new checking logic is: - Duplicates can appear in different paths of the same select. - Duplicates can *not* appear within the same path of a select. - Duplicates can *not* appear across multiple selects (no matter what path - this is still stricter than we need to be, but there's no strong case for refining this case now). -- MOS_MIGRATED_REVID=93447979
* Optimize AggregatingAttributeMapper.visitAttribute (which returnsGravatar Greg Estren2015-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | every possible value an attribute can take) for attributes with multiple selects: Given attr = select({':a': 'w', ':b': 'x'}) + select({':a': 'y', ':b': 'z'} the naive approach is to combine every possible value of the first select with every possible value of the second select (producing 4 possible values from 2^2 visitations). But since these selects have the same exact conditions, only two values are actually possible ("wy", "xz") from 2 visitations. This change efficiently considers that case. More generally, given n concatenated selects with the same conditions, it brings evaluation time down from O(2^n) to O(n) (assuming two conditions per select). It also works for partial matches: given a concatenation of 6 selects where 1, 3, and 5 have the same conditions and 2, 4, and 6 have the same conditions, evaluation time goes from O(2^6) to O(2^2). -- MOS_MIGRATED_REVID=93325787
* Further reduction of calls to AggregatingAttributeMapper.visitAttribute.Gravatar Greg Estren2015-04-16
| | | | | | | This is now not called on the regular build path except for computed defaults. -- MOS_MIGRATED_REVID=91306062
* 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
* 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
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957