aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java
Commit message (Collapse)AuthorAge
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194998981
* Move shell executable to its own configuration fragment.Gravatar lberki2018-04-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 191861074
* Move TransitiveTargetKey to a dedicated top-level classGravatar ulfjack2017-10-30
| | | | PiperOrigin-RevId: 173873310
* LateBoundDefault: enforce access to a single fragment (or none).Gravatar mstaib2017-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is no way to enforce that LateBoundDefaults only access the fragments that they declare. This means that LateBoundDefaults can fail to declare fragments at all, or declare the wrong ones, and still have no troubles. But when trimming, these fragments must be declared, because otherwise they will not necessarily be available. This change refactors LateBoundDefault to declare a single fragment type, not a set. All existing LateBoundDefaults use sets with a single element or no elements at all for their set of fragment classes, so this does not limit anything being done currently. To account for LateBoundDefaults which do not use configuration at all, typically those which only want to access the configured attribute map, it is possible for Void to be the fragment class which is requested. To account for LateBoundDefaults which need to access methods of the BuildConfiguration instance itself, it is possible for BuildConfiguration to be the fragment class which is requested; however, this is unsafe, so it is only a temporary state until a way to do this without also giving access to all of the fragments can be added. Drive-by refactoring: LateBoundDefaults' values are now typed. All actual production LateBoundDefaults were Label or List<Label> typed, through the LateBoundLabel and LateBoundLabelList subclasses. These subclasses have been removed, and LateBoundDefault has two type parameters, one for the type of its input, and one for the type of its output. RELNOTES: None. PiperOrigin-RevId: 169242278
* Remove TransitiveTargetValue.transitive{S,Uns}uccessfulPkgsGravatar ulfjack2017-07-19
| | | | | | | It was only used by GenQuery, for which we can use getTransitiveRootCauses() and getTransitiveTargets() instead. PiperOrigin-RevId: 162471592
* Generalize ConfigSetting's special options handling.Gravatar mstaib2017-04-05
| | | | | | | | | | | | | | | | Currently ConfigSetting is treated specially; TransitiveTargetFunction identifies it by name, then runs a special function on it. This change makes ConfigSetting use a new options reference function in RuleClass, which TransitiveTargetFunction will evaluate over the rule and use with the options-to-fragments map to figure out which fragments are needed. Although this is still a hack and not really a new feature on RuleClass, this avoids a dependency on ConfigSettingRule from TransitiveTargetFunction, which is necessary for ConfigSettingRule to be moved to rules/config. RELNOTES: None. PiperOrigin-RevId: 152156905
* 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
* Dynamic configs: also include fragments needed to resolve the rule's ↵Gravatar Greg Estren2016-08-03
| | | | | | | | | | | | | | late-bound attributes To be clear: late-bound attributes introduce two new classes of fragments. First is those needed by Attribute.LateBoundDefault to figure out what the attribute's value is. Second is whatever's needed by the actual dep (for label-typed attributes) and its deps. This change only adds the first. The second is harder since we can't determine it until we're already in the analysis phase. -- MOS_MIGRATED_REVID=129117755
* Description redacted.Gravatar Googler2016-07-22
| | | | | -- MOS_MIGRATED_REVID=128199284
* Make aspects work through bind(). Gravatar Lukacs Berki2016-04-22
| | | | | | | | | | | bind() is assumed to be able to provide any provider. This is suboptimal, but beats the alternative of traversing the dependency graph to an arbitrary depth. The reason for the removal of the iteration ability in TransitiveInfoCollection is that now aspects can be attached to BindConfiguredTarget, too, which is not a RuleConfiguredTarget. Whereas I could have implemented the iterator, it was used only in BindConfiguredTarget anyway, so there didn't seem to be much reason to. Some work towards #952. -- MOS_MIGRATED_REVID=120549877
* Properly filter out Aspect attributes when `blaze query` requests ↵Gravatar Dmitry Lomov2016-01-22
| | | | | | | | | --noimplicit_deps and/or --nohost_deps. RELNOTES: --noimplicit_deps and --nohost_deps work correctly for Aspect attributes. -- MOS_MIGRATED_REVID=112724917
* Add dynamic config support for config_setting rules.Gravatar Greg Estren2015-11-20
| | | | | | | | | | | | | | | | Specifically, given: config_setting( name = 'foo', values = {'copts': '-DABC'}) this requires a dependency on the Cpp configuration fragment. config_setting rules are unique in that this dependency comes from string representations of option names. -- MOS_MIGRATED_REVID=108268831
* When computing the transitive config fragments required by a target,Gravatar Greg Estren2015-11-18
| | | | | | | | | | | | | | | include Skylark-declared requirements (which use names instead of fragment class, e.g. "cpp" vs. CppConfiguration.class). Also add "cpp" to Skylark java_* definitions, since java_* rules are used to trigger LipoDataTransitions and thus expected to have a CppConfiguration fragment. Test coverage: skylark.BindTest with --experimental_dynamic_configs=1. (and other Skylark tests). -- MOS_MIGRATED_REVID=108041244
* Add the concept of a "universal" configuration fragment, which allGravatar Greg Estren2015-11-16
| | | | | | | | | | | | | | | | | configurations contain regardless of whether their rules explicitly require it. This is used to ensure all rules have BazelConfiguration. That fragment supplies the path to the shell, which powers BuildConfiguration.getShExecutable(), which powers any rule that generates a SpawnAction. Since SpawnActions are such a ubiquitous pattern we only want to accelerate going forward, there's no point not to make this automatically available to every rule. -- MOS_MIGRATED_REVID=107786879
* Parametrize aspect definition with AspectParameters.Gravatar Dmitry Lomov2015-11-02
| | | | | -- MOS_MIGRATED_REVID=106848269
* Change default for rule classes that don't explicitlyGravatar Greg Estren2015-10-28
| | | | | | | | | | | | | | | declare required configuration fragments: from *everything* to *nothing*. Now that all builtin rules properly declare their fragments, the "backwards compatibility" concern that inspired the original behavior is no longer needed. This impacts, for example, filegroup rules, which have nothing to declare. -- MOS_MIGRATED_REVID=106433791
* Inline TargetMarker in TransitiveTraversalFunctionGravatar Mark Schaller2015-10-23
| | | | | | | | | | Simplifies the runtime graph when TransitiveTraversalFunction is used. Also moves an error reporting method from the base function to the TransitiveTargetFunction, which is the only one that uses it. -- MOS_MIGRATED_REVID=106109745
* Extract configuration fragment access logic into ConfigurationFragmentPolicy.Gravatar Michael Staib2015-09-30
| | | | | | | | | | | This is the first step toward giving aspects the ability to define their own required configuration fragments, extracting the required configuration metadata into a common place. This should be a no-op refactoring. -- MOS_MIGRATED_REVID=104249500
* Clean up Aspect checks in query tests.Gravatar Eric Fellheimer2015-09-28
| | | | | -- MOS_MIGRATED_REVID=103977080
* 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
* Stop throwing an exception if a Package was successfully created but ↵Gravatar Janak Ramakrishnan2015-09-17
| | | | | | | | | | | contains errors. Instead, require callers to process the package and throw if they need to. This allows us to avoid embedding a Package in an exception, which is icky. This also allows us to remove Package#containsTemporaryErrors. Most callers' changes are fairly straightforward. The exception is EnvironmentBackedRecursivePackageProvider, which cannot throw an exception of its own in case of a package with errors (because it doesn't do that in keep_going mode), but whose request for a package with errors *should* shut down the build in case of nokeep_going mode. To do this in Skyframe, we have a new PackageErrorFunction which is to be called only in this situation, and will unconditionally throw. EnvironmentBackedRecursivePackageProvider can then catch this exception and continue on as usual, except that the exception will shut down the thread pool in a nokeep_going build. -- MOS_MIGRATED_REVID=103247761
* Fix some warnings.Gravatar Ulf Adams2015-09-04
| | | | | -- MOS_MIGRATED_REVID=102332437
* Move PackageIdentifier to cmdlineGravatar Kristina Chodorow2015-08-31
| | | | | | | | This is necessary to have TargetResolver depend on it without making it depend on the packages target. First step of #389. -- MOS_MIGRATED_REVID=101790345
* Avoid Skyframe restarts in transitive targets due related to conservative ↵Gravatar Eric Fellheimer2015-08-20
| | | | | | | aspect deps. -- MOS_MIGRATED_REVID=100960261
* TransitiveTraversalFunction now implements "conservative" (a la ↵Gravatar Eric Fellheimer2015-08-13
| | | | | | | ConservativeAspectResolver) aspect resolution. -- MOS_MIGRATED_REVID=100526575
* Extract base class from TransitiveTargetFunctionGravatar Mark Schaller2015-07-30
| | | | | -- MOS_MIGRATED_REVID=99386094
* Cleanup of TransitiveTarget and TargetMarker functionsGravatar Mark Schaller2015-07-30
| | | | | | | | | | Added more information to TargetMarkerFunction documentation. Cleaned up and rearranged some code in TransitiveTargetFunction to help with future refactoring. -- MOS_MIGRATED_REVID=99384291
* Activate interleaved package and transitive target loadingGravatar Mark Schaller2015-07-08
| | | | | | | | Hooks up the recently introduced interleaved loading functions to normal graph loading. -- MOS_MIGRATED_REVID=97679451
* Print an error message when an @foo dep isn't foundGravatar Kristina Chodorow2015-06-17
| | | | | | | | | TransitiveTargetFunction only prints an error message if the package names match, so it was just exiting with "loading failed" when there was an error with external dependencies. -- MOS_MIGRATED_REVID=96204337
* Add an entry to TransitiveTargetValue that tracks theGravatar Greg Estren2015-05-27
| | | | | | | | | | | | | | | | configuration fragments needed by a rule's transitive closure. Also add a Skyframe BuildConfiguration node. Memory and performance profiling shows no noticeable performance hit in loading or analysis and a 0.35% memory increase for moderately sized (by Google standards) build graphs when these are depended upon in ConfiguredTargetFunction. -- MOS_MIGRATED_REVID=94517099
* Remove direct store of Target from NoSuchTargetException. Instead, just note ↵Gravatar Eric Fellheimer2015-04-02
| | | | | | | the fact that a valid Target exists, and instead request it directly from its Package. -- MOS_MIGRATED_REVID=90107670
* Clean up an unnecessary field in NoSuchTargetException.Gravatar Eric Fellheimer2015-04-02
| | | | | -- MOS_MIGRATED_REVID=90081310
* Add support of aspects to the skyframe implementation of query. To keep ↵Gravatar Marian Lobur2015-03-25
| | | | | | | these two versions of query consistent we need to add additional edges to the target that contains aspects, instead of adding it to the target that was in direct deps of the original one. -- MOS_MIGRATED_REVID=89483301
* Some cleanup changes.Gravatar Ulf Adams2015-03-05
| | | | | -- MOS_MIGRATED_REVID=87821306
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957