aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
* Rework LoadingPhaseCompleteEvent & AnalysisPhaseCompleteEvent to account for ↵Gravatar nharmata2017-07-19
| | | | | | | the fact that loading and analysis is now interleaved. RELNOTES: None PiperOrigin-RevId: 162388460
* Clean up a few Skylark-Skyframe structuresGravatar brandjon2017-07-19
| | | | | | | Add value-class methods to SkylarkFileDependency and SkylarkImportLookupValue. Remove Java serialization hack from Extension. RELNOTES: None PiperOrigin-RevId: 162383283
* Implement toolchain resolution via constraint checks.Gravatar John Cater2017-07-19
| | | | | | | Part of #2219. Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d PiperOrigin-RevId: 162359389
* Add --extra_toolchains flag to register additional toolchain labels.Gravatar John Cater2017-07-19
| | | | | | | Fixes https://github.com/katre/bazel/issues/4. Change-Id: I664aaeb0d2aa4f36ecd0f1a5f13b5d7f25dcc8d6 PiperOrigin-RevId: 162355466
* Move ParsingFailureEvent reporting to TargetPatternFunctionGravatar ulfjack2017-07-18
| | | | | | | We're parsing the target pattern before we create the SkyKey, so all callers of the key creation also need to report this event. PiperOrigin-RevId: 162326973
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Remove ParseFailureListener in favor of posting to EventBus directlyGravatar ulfjack2017-07-18
| | | | | | | We now have the ExtendedEventHandler, which is available in all the relevant code paths, so we just post the event directly. PiperOrigin-RevId: 162200923
* Aspects-on-aspects correctness fix.Gravatar dslomov2017-07-14
| | | | | | | | Fixes an issue where an aspect propagates over a target that depends on another target twice with different set of aspects applied. RELNOTES: None. PiperOrigin-RevId: 161931168
* If globbing throws an IOException, fail to construct the package instead of ↵Gravatar janakr2017-07-14
| | | | | | | | constructing the package with an error. Prior to this change, if a Package.Builder object was constructed, it was guaranteed that a Package (possibly with errors) would be created. This is no longer true: if an IOException is set on the Package.Builder object, it will throw a NoSuchPackageException during #build(). PiperOrigin-RevId: 161832111
* Add a SkyFunction to perform toolchain resolution.Gravatar John Cater2017-07-14
| | | | | | | Part of #2219. Change-Id: I339009c13639144ca756eb07c520df7d430a64e3 PiperOrigin-RevId: 161826487
* Fix declared providers behaviorGravatar vladmos2017-07-14
| | | | | | | | | DefaultInfo used to not be used when old-style and declared providers were mixed (struct=(custom='key', providers=[DefaultInfo(...)])). Also when a single declared provider was returned it used to be treated as an old-style struct. PiperOrigin-RevId: 161796415
* Add skyfunction to return all registered toolchain labels.Gravatar John Cater2017-07-13
| | | | | | | Part of #2219. Change-Id: I7293fd13bd8e0931f92afd051e18a9e7ce63762d PiperOrigin-RevId: 161721445
* Avoid races while deleting output directory ancestorsGravatar mschaller2017-07-13
| | | | | | | | | | | | | When an output file becomes a directory from one build to another, the filesystem operations performed by several threads can race while they prepare output directories. Without synchronization, these races can cause failures. See the comments added in this CL for more detail. This CL adds synchronization around these filsystem operations and gets rid of the problematic races. RELNOTES: None. PiperOrigin-RevId: 161714702
* Automated rollback of commit 937350211dcd55a4714ec32ebbf33fffcc42cdf2.Gravatar kchodorow2017-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke the go rules (of course) See http://ci.bazel.io/job/rules_go/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/1044/console. *** Original change description *** Resolve references to @main-repo//foo to //foo Bazel was creating an dummy external repository for @main-repo, which doesn't work with package paths and will cause conflicts once @main-repo//foo and //foo refer to the same path. This adds a "soft pull" option to WorkspaceNameFunction: it can either parse the entire WORKSPACE file to find the name or just the first section. That way PackageLookupFunction can find the repository name without causing a circular dependency. This should have no ch... *** PiperOrigin-RevId: 161572272
* Resolve references to @main-repo//foo to //fooGravatar kchodorow2017-07-11
| | | | | | | | | | | | | | | | Bazel was creating an dummy external repository for @main-repo, which doesn't work with package paths and will cause conflicts once @main-repo//foo and //foo refer to the same path. This adds a "soft pull" option to WorkspaceNameFunction: it can either parse the entire WORKSPACE file to find the name or just the first section. That way PackageLookupFunction can find the repository name without causing a circular dependency. This should have no change of behavior and is already tested in https://github.com/bazelbuild/bazel/blob/master/src/test/shell/bazel/workspace_test.sh#L176. PiperOrigin-RevId: 161536466
* Add register_toolchains function to the WORKSPACE for registering toolchains ↵Gravatar John Cater2017-07-11
| | | | | | | | | to use. Part of #2219. Change-Id: Id6dfe6ec102f609bb19461242a098bf977be29ae PiperOrigin-RevId: 161527986
* Remove dynamic configs dep on the static transition table.Gravatar gregce2017-07-11
| | | | PiperOrigin-RevId: 161432622
* Do not NPE crash when C++ actions are not configured in crosstoolGravatar hlopko2017-07-07
| | | | | | | Show meaningful message instead. RELNOTES: None. PiperOrigin-RevId: 161196096
* Factor out BuildConfigurationCollection.Transitions.getDynamicTransition.Gravatar gregce2017-07-07
| | | | | | | | | | | | This is a legacy dependency on the configuration transition table, which is only needed for static configurations. Dynamic configurations didn't actually use anything in that table: this was just a convenience interface that could have equally been defined somewhere else. So this cl defines it somewhere else. There's still one last dependency: Transitions.configurationHook. We'll tackle that in a followup cl. PiperOrigin-RevId: 161141650
* Exclude //external targets from //...Gravatar kchodorow2017-07-07
| | | | | | | | | | Fixes #3307 and #1606. The problem was that TargetPatternResolver was trying to figure out if repositories were tagged as "manual," but repository rules don't have a "tags" field. Repository rules shouldn't be included by //... generally. TargetPatternResolver was just ls-ing // to find all the "packages," so this removes external/ from consideration. PiperOrigin-RevId: 161134437
* Simplify the ActionInputFileCacheGravatar ulfjack2017-07-06
| | | | | | | | | Add a single getMetadata method (matching MetadataHandler), and rewrite everything in those terms. This is in preparation for merging ActionInputFileCache and MetadataHandler. PiperOrigin-RevId: 161053535
* Create top-level configs dynamically: period.Gravatar gregce2017-07-06
| | | | | | | | | | | | | | | Before this change, top-level configs were still built statically, then cloned into dynamic configs to run the actual build. After this change, no static configuration should ever be created in a dynamically configured build. We're still keeping support for --experimental_dynamic_configs=off a bit longer to provide easy reversion on any bad surprises. But barring that we'll quickly move toward making --experimental_dynamic_configs=off a no-op, then ripping out Bazel's static configuration logic. PiperOrigin-RevId: 161005150
* Fix LocalRepositoryLookupFunction to normalize paths so they are compared ↵Gravatar John Cater2017-07-06
| | | | | | | | | properly. Part of #2811. Change-Id: I15da53d1f6ec7f4a41f5d14fdd9dafd5ad82f9fc PiperOrigin-RevId: 160982624
* Introduce --incompatible_new_actions_api flag.Gravatar dslomov2017-07-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 160831413
* Inline AttributeContainer.ATTRIBUTE_CONTAINER_FACTORY and ↵Gravatar laurentlb2017-07-03
| | | | | | | PathFragment.TO_PATH_FRAGMENT RELNOTES: None. PiperOrigin-RevId: 160668541
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* Refactor SkyQueryEnvironment to allow preprocessing or postprocessing targetsGravatar Googler2017-06-27
| | | | | | | | Refactor SkyQueryEnvironment and a few other query helpers to make it easier to work with targets. RELNOTES: None PiperOrigin-RevId: 160165398
* Make Metadata an interface for FileArtifactValueGravatar ulfjack2017-06-26
| | | | | | | | | | Replace all previous uses of Metadata with FileArtifactValue (or a simple inner class in the case of ActionCacheChecker.CONSTANT_METADATA). Care was taken to make the equals method obey the equals contract, even in the presence of multiple implementations. PiperOrigin-RevId: 160115080
* ActionMetadataHandler: proper metadata even for the volatile workspace statusGravatar ulfjack2017-06-21
| | | | | | | | | | | | | | This is part of cleaning up the ActionInputFileCache / MetadataHandler split. Both classes generally store and return identical information, except the MetadataHandler lies about constant metadata artifacts. Instead of lying here, update the ActionCacheChecker, which is the only place where we actually want constant metadata. Additionally, remove getMetadataMaybe; again, the only caller that needs special casing is the ActionCacheChecker, so we move the special casing there instead of having it in the MetadataHandler. PiperOrigin-RevId: 159665345
* Extract ActionContext to a top-level classGravatar ulfjack2017-06-19
| | | | PiperOrigin-RevId: 159423459
* Rewrite the Executor/ActionExecutionContext splitGravatar ulfjack2017-06-19
| | | | | | | Move everything to ActionExecutionContext, and drop Executor whereever possible. This clarifies the API, makes it simpler to test, and simplifies the code. PiperOrigin-RevId: 159414816
* Static-ize ConfigurationBuilderEnvironment.Gravatar mstaib2017-06-19
| | | | | | | | | This inner class has no reason to be non-static that I can see. This should have no effect on memory if I understand how Java memory usage works, but it confused me, so I cleaned it up. RELNOTES: None. PiperOrigin-RevId: 159255460
* A bunch of unrelated cleanups:Gravatar nharmata2017-06-16
| | | | | | | | | | -Have SkylarkImportLookupFunction include causes in the SkyFunctionExceptions it throws. -Better transitive skyframe error declarations in ASTFileLookupFunction. -Have ErrorInfo differentiate between direct and transitive transience. -Introduce ErrorInfoManager and have ParallelEvaluator/ParallelEvaluatorContext use it. RELNOTES: None PiperOrigin-RevId: 159163186
* Remove unused interface PreprocessorGravatar Klaus Aehlig2017-06-16
| | | | | Change-Id: I008c16d747c5d06f433af14cd0793536cff2723e PiperOrigin-RevId: 158975286
* Propagate postable events further upGravatar Klaus Aehlig2017-06-14
| | | | | | | | | | | | With the introduction of the ExtendedEventHandler, SkyFunctions were given the possibility to post additional Postable events in addition to the standard events. As SkyFunctions have to be restartable, events are collected first and only posted after the function is finished. Make sure that this also applies to postable events and they are not dropped. Change-Id: Ie1c3a0134935c75ea984fa2cc924e7327a9da81f PiperOrigin-RevId: 158964337
* Cleanup in ValidationEnvironment, provide static methods, reduce visibility.Gravatar laurentlb2017-06-12
| | | | | | | | | Call sites were creating a ValidationEnvironment object with no other purpose than calling validateAst(). Simplify the code so that callers don't have to worry about it. RELNOTES: None. PiperOrigin-RevId: 158705853
* Make PackageFunction's strategy for handling unreadable BUILD files ↵Gravatar nharmata2017-06-08
| | | | | | | configurable. Add a test for the current behavior of treating an unreadable BUILD file as a package loading error. RELNOTES: None PiperOrigin-RevId: 158314187
* Have BazelPackageLoader use the newly added BazelSkyframeExecutorConstants.Gravatar nharmata2017-06-07
| | | | PiperOrigin-RevId: 158159054
* Factor out Bazel-specific ctor constants in SequencedSkyframeExecutor into a ↵Gravatar nharmata2017-06-06
| | | | | | | separate class. They're currently passed in around various callsites in the codebase and tests. RELNOTES: None PiperOrigin-RevId: 158139074
* Automated g4 rollforward of commit b71e99b1f3746103e5d6802eebc24096b3494959.Gravatar gregce2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | (Automated g4 rollback of commit de92f9d8ea093416fae999073bbfcf3cf501ab55). *** Reason for rollback *** The problems that forced commit de92f9d8ea093416fae999073bbfcf3cf501ab55 were fixed in commit e6392cd380fce14d719890c78d5eb2657e8a6cfc . *** Original change description being rolled forward *** Implement dynamically configured LIPO builds. Quick overview: - provide a dynamic interface for getting the artifact owner configuration - provide a (dynamic) RuleTransitionFactory LIPO_ON_DEMAND to replace the (static) RuleClass.Configurator LIPO_ON_DEMAND. Eventually we'll remove the rule class configurator interface entirely.... *** ROLLBACK_OF=156180015 PiperOrigin-RevId: 157865224
* Include the root cause IOException in the BuildFileContainsErrorsException ↵Gravatar nharmata2017-06-05
| | | | | | | thrown when PackageFunction encounters such an IOException when reading the contents of a BUILD file. RELNOTES: None PiperOrigin-RevId: 157853283
* Make workspace cycle reporting a little more flexibleGravatar kchodorow2017-05-29
| | | | | | Fixes #2999. PiperOrigin-RevId: 157222957
* Automated g4 rollback of commit c4134802dd15d6ef5cca6521f6bf6aac395ee2ad.Gravatar kchodorow2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward of directory name change *** Original change description *** Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b. *** Reason for rollback *** Breaks //src/test/shell/integration:force_delete_output_test *** Original change description *** Symlink output directories to the correct directory name If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 156892980
* Make PackageOrException.get() public + make loadPackages() variant.Gravatar carmi2017-05-23
| | | | | RELNOTES: None PiperOrigin-RevId: 156876531
* Fix aspect processing when same dep appears in 2 attributes.Gravatar kaipi2017-05-22
| | | | | | If a target appeared in 2 different attributes, it is not processed twice, even if different aspects were applied to the different attributes. In that case, only one of the aspects is applied. This commit fixes this by checking which aspects have been applied to the target, instead of checking if the target was already processed. PiperOrigin-RevId: 156738275
* Create a loadPackages() method that loads multiple packages simultaneously, ↵Gravatar carmi2017-05-22
| | | | | | | | | using multiple threads. The immediate upside is that if multiple packages load the same bzl file, that file will only be read once when using loadPackages(). RELNOTES: None PiperOrigin-RevId: 156621988
* Make the number of legacy globbing threads configurable. PackageFactory's ↵Gravatar nharmata2017-05-19
| | | | | | | hardcoded default of 100 isn't a good choice for all PackageLoader users. RELNOTES: None PiperOrigin-RevId: 156468439
* PiperOrigin-RevId: 156331430Gravatar nharmata2017-05-19
|
* Automated g4 rollback of commit b71e99b1f3746103e5d6802eebc24096b3494959.Gravatar mstaib2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Causes crash bug in certain circumstances. *** Original change description *** Implement dynamically configured LIPO builds. Quick overview: - provide a dynamic interface for getting the artifact owner configuration - provide a (dynamic) RuleTransitionFactory LIPO_ON_DEMAND to replace the (static) RuleClass.Configurator LIPO_ON_DEMAND. Eventually we'll remove the rule class configurator interface entirely. This doesn't actually turn dynamic LIPO on. So the direct effect of this change should be a no-op. The flip will come in a followup change. For now, dynamic... PiperOrigin-RevId: 156180015
* Have TransitiveTraversalValues store kind of targets which have errors when ↵Gravatar Googler2017-05-16
| | | | | | | computing TransitiveTraversalValues. RELNOTES: None PiperOrigin-RevId: 156138657