aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
* Make ArtifactFunctionTest#testMiddlemanArtifact more realistic by making the ↵Gravatar Janak Ramakrishnan2017-03-22
| | | | | | | | | | output artifact of a middleman action a middleman artifact. Step -0.5. -- PiperOrigin-RevId: 150769517 MOS_MIGRATED_REVID=150769517
* Factor out local variables in FilesystemValueCheckerTest, just to reduce the ↵Gravatar Janak Ramakrishnan2017-03-21
| | | | | | | | | | number of ActionExecutionValue.key calls. Step -1, maybe? -- PiperOrigin-RevId: 150681863 MOS_MIGRATED_REVID=150681863
* Enforce that the SkyKey returned by ActionLookupKey#getSkyKey is an ↵Gravatar Janak Ramakrishnan2017-03-21
| | | | | | | | | | ActionLookupKey. It was only being violated for some singleton keys. Also do some drive-by cleanups of unused variables. Step approximately -2. -- PiperOrigin-RevId: 150668944 MOS_MIGRATED_REVID=150668944
* Enable rules to transition based on their Rule objects.Gravatar Michael Staib2017-03-21
| | | | | | | | | | | | This begins to allow for cases where a rule sets configuration based on its attributes, such as where a rule attribute names flags and their values - sort of a reverse select. There are no such cases yet, but they're coming! -- PiperOrigin-RevId: 150648357 MOS_MIGRATED_REVID=150648357
* Simplify Attribute.Configurator, add dynamic configs support.Gravatar Greg Estren2017-03-14
| | | | | | | | | | | | | | Specifically: 1) Read BuildOptions instead of BuildConfiguration 2) Remove unused extra parameters 1) is especially useful for dynamic configs. Before this change, dynamic configs just didn't support attribute configurators. This is because support would require Skyframe-instantiating temporary intermediate configurations, which is horribly awkward and would massively complicate Bazel's dependency evaluation logic. Using BuildOptions instead of BuildConfiguration completely eliminates the problem. As a bonus, dynamic configs can compose attribute configurators with any other transitions (including splits). This actually makes them more powerful than static configs. Whether anyone wants to use that composition is a different story, but that's now a policy decision vs. a technical limitation. This should also come in handy for RuleClass configurators, which will likely also leverage this. -- PiperOrigin-RevId: 150080977 MOS_MIGRATED_REVID=150080977
* Improve query error msg when a package has a broken Skylark loadGravatar Mark Schaller2017-03-12
| | | | | | | | | | | | | | | | | | | | | | | | The error message logged during query (and build) when a package has a broken Skylark load statement was not specific. Previously, it said "package contains errors:" and then the package name. Also, this error message was not emitted when using SkyQueryEnvironment and evaluating a query containing a "TargetsBelowDirectory" pattern (such as //foo/...) when a package below the specified directory had such an error. The approach taken by this CL is to include any package loading error message in the SkyValue produced by CollectPackagesUnderDirectoryFunction, and report them during evaluation of a TargetsBelowDirectory pattern. RELNOTES: Evaluation of commands on TargetsBelowDirectory patterns (e.g. //foo/...) matching packages that fail to load now report more detailed error messages in keep_going mode. -- PiperOrigin-RevId: 149802362 MOS_MIGRATED_REVID=149802362
* Support composed dependency transitions with dynamic configs.Gravatar Greg Estren2017-03-08
| | | | | | -- PiperOrigin-RevId: 149439502 MOS_MIGRATED_REVID=149439502
* Remove all the action resource estimation codeGravatar Ulf Adams2017-03-06
| | | | | | -- PiperOrigin-RevId: 149110466 MOS_MIGRATED_REVID=149110466
* Rationalize local resource acquisitionGravatar Ulf Adams2017-03-03
| | | | | | | | | | | | | | | | | | | | | | Move all local resource acquisition to where local execution actually happens. Don't attempt to acquire resources per action, but only for individual spawns. This significantly simplifies the code. The downside is that we don't account for action-level work anymore. In general, actions should not perform any process execution themselves, but always delegate such work to a SpawnStrategy implementation. This change makes sure that every Spawn has local resources set in a way that is consistent with the previous state. However, there are two actions - Fileset and FileWrite -, which are not spawns, and so we now don't limit their concurrent execution anymore. For Fileset, all work is done in a custom Fileset-specific thread pool, so this shouldn't be a problem. I'm not sure about FileWriteAction. -- PiperOrigin-RevId: 149012600 MOS_MIGRATED_REVID=149012600
* Convert --use_action_cache to a regular optionGravatar Googler2017-03-01
| | | | | | | | RELNOTES: Convert --use_action_cache to a regular option -- PiperOrigin-RevId: 148804881 MOS_MIGRATED_REVID=148804881
* Clean up the semantics of input discovering actions a bit by making ↵Gravatar Lukacs Berki2017-02-28
| | | | | | | | | | | | updateInputs() and inputsKnown() non-overridable and removing setInputs(). This comes at the cost of adding a flag to every action instance that's not used for non-input-discovering actions, but I think that's a deal. Simpler APIs are good, mmmmkay? Also fixed a few pre-existing issues in TestAction and ObjcCompileAction. -- PiperOrigin-RevId: 148749734 MOS_MIGRATED_REVID=148749734
* Provide more reporting options to SkyFunctions Gravatar Klaus Aehlig2017-02-27
| | | | | | | | | | | | | With more specific information to be reported by Skyfunctions, e.g., to inform the build-event protocol on missing files, the EventHandler interface is no longer enough. Therefore, provide an enriched context for reporting events. -- Change-Id: I2d06166fe4d5b9054e24ad8c752fafc039e3f9f8 Reviewed-on: https://cr.bazel.build/8794 PiperOrigin-RevId: 148463437 MOS_MIGRATED_REVID=148463437
* Allow absolute symlinks in TreeArtifacts. Let the downstream action (if ↵Gravatar Janak Ramakrishnan2017-02-23
| | | | | | | | there is one) worry about it. -- PiperOrigin-RevId: 148249223 MOS_MIGRATED_REVID=148249223
* If dynamic configurations are turned on, ruleclass configuration transitionsGravatar Cal Peyser2017-02-22
| | | | | | | | apply on the top level. -- PiperOrigin-RevId: 148155171 MOS_MIGRATED_REVID=148155171
* Skip computing digests when --use_action_cache=false.Gravatar Googler2017-02-16
| | | | | | | | | | | | | Does this by delegating responsibility for constructing ActionCache.Entry instances to the ActionCache, and having the StubActionCache return null. Tests show a 1-2% elapsed-time reduction for clean builds: [] Doesn't use interface default methods, because we still need JDK7 for Mac. -- PiperOrigin-RevId: 147722062 MOS_MIGRATED_REVID=147722062
* Add a test to PackageFunctionTest confirming current glob behavior.Gravatar Janak Ramakrishnan2017-02-14
| | | | | | -- PiperOrigin-RevId: 147396952 MOS_MIGRATED_REVID=147396952
* Introduce CppCompileActionTemplate, which expands into a list of ↵Gravatar Rumou Duan2017-02-10
| | | | | | | | CppCompileActions that to be executed at execution time. -- PiperOrigin-RevId: 147163077 MOS_MIGRATED_REVID=147163077
* Introduce a new SkyValue that merely contains the workspace name. The ↵Gravatar Nathan Harmata2017-02-09
| | | | | | | | | | | | workspace name is needed for package loading, and so splitting out this computation into a separate skyframe node that can be change-pruned gives us better incrementality; previously we'd need to reload all packages on a WORKSPACE file change. N.B. (i) This CL doesn't solve all the other performance issues with //external in Bazel/Blaze since it's still inefficiently used for resolving labels like @foo//bar:baz. (ii) This CL doesn't address the wasteful invalidation + change pruning of all the packages. -- PiperOrigin-RevId: 146925369 MOS_MIGRATED_REVID=146925369
* Introduce a Skyframe function: ActionEnvironmentFunction Gravatar Damien Martin-Guillerez2017-02-08
| | | | | | | | | | | | | | | | | | ActionEnvironmentFunction returns the list of environment variable with the one overwritten by --action_env being replaced. This let other Skyframe function declares dependency to any value of the environment and being influenced by the --action_env flag. This will be used to declare dependency of remote repositories on environment variables (step 3 of https://bazel.build/designs/2016/10/18/repository-invalidation.html) -- Change-Id: I1ed3fb6f48e8e17d4d64c903fccecb6ed7596350 Reviewed-on: https://cr.bazel.build/7974 PiperOrigin-RevId: 146918603 MOS_MIGRATED_REVID=146918603
* Remove dead code in SkyframeLabelVisitorGravatar Ulf Adams2017-02-07
| | | | | | | | | | Two of the functions are never used, several of the parameter are not used or can be simplified (require callers to convert from Target -> Label). -- PiperOrigin-RevId: 146787380 MOS_MIGRATED_REVID=146787380
* Inject the changes in the client environment for the ClientEnvironmentFunction Gravatar Damien Martin-Guillerez2017-02-02
| | | | | | | | | | | | Using a precomputed values prevent us from being able to depends on any environment variable (or we would invalidate the whole graph each time the environment change, that is each time we run a command). -- Change-Id: If322df4240271d04b9278e1222f936156531580c Reviewed-on: https://cr.bazel.build/8400 PiperOrigin-RevId: 146298592 MOS_MIGRATED_REVID=146298592
* Split transitions that return an empty list of options do not suppress ↵Gravatar Cal Peyser2017-01-30
| | | | | | | | | | dynamic ruleclass transitions. -- PiperOrigin-RevId: 146000375 MOS_MIGRATED_REVID=146000375
* Require parens around tuple with trailing comma.Gravatar Laurent Le Brun2017-01-17
| | | | | | | | | | RELNOTES[INC]: Tuples that end with a trailing comma must now be inside parens, e.g. (1,) instead of 1, -- PiperOrigin-RevId: 144690953 MOS_MIGRATED_REVID=144690953
* Allows a rule class to specify a configuration transtion that will apply to allGravatar Cal Peyser2017-01-12
| | | | | | | | | | incoming edges if dynamic configurations are turned on. This CL does not cover top-level nodes. -- PiperOrigin-RevId: 144258789 MOS_MIGRATED_REVID=144258789
* Remove the inmemoryfs library from lib:foundationGravatar Ulf Adams2017-01-10
| | | | | | | | No production code should depend on inmemoryfs. -- PiperOrigin-RevId: 144054981 MOS_MIGRATED_REVID=144054981
* Add an "integration" test (rather, just a test that exercises the relevant ↵Gravatar Janak Ramakrishnan2017-01-06
| | | | | | | | package-evaluation code) for []. -- PiperOrigin-RevId: 143744672 MOS_MIGRATED_REVID=143744672
* Remove WalkableGraph#exists and allow WalkableGraph#getValue and ↵Gravatar Janak Ramakrishnan2017-01-03
| | | | | | | | WalkableGraph#getException to be given non-existent keys without crashing. Add WalkableGraph#isCycle to fill the gap in testing for the difference between non-existence and depending on a cycle. -- PiperOrigin-RevId: 143205289 MOS_MIGRATED_REVID=143205289
* Provide deterministic order for split configured deps (roll forward part 2).Gravatar Greg Estren2016-12-07
| | | | | | | | | | | | | | | | | | | | | Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. This is a roll forward of commit 7505d94c19727e3100ac5e16a960bff2cb324f23. The original changed failed for two reasons: 1) Windows-only: "ppc" wasn't recognized as a valid cpu: https://github.com/bazelbuild/bazel/issues/2191 2) Bazel requires android_binary's "manifest" attribute to be "AndroidManifest.xml": https://www.google.com/url?sa=D&q=http%3A%2F%2Fci.bazel.io%2Fjob%2Fbazel-tests%2FBAZEL_VERSION%3DHEAD%2CPLATFORM_NAME%3Dubuntu_15.10-x86_64%2FlastCompletedBuild%2FtestReport%2F This version uses "armeabi-v7a" instead of "ppc" and "AndroidManifest.xml" in the splitDeps test. -- PiperOrigin-RevId: 141313454 MOS_MIGRATED_REVID=141313454
* Rollback of commit 12d766df10fbc5eba16ec1e6c20c8cd85f9c616f.Gravatar Damien Martin-Guillerez2016-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Still fails bazel-tests See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=ubuntu_15.10-x86_64/lastCompletedBuild/testReport/ for instance *** Original change description *** Provide deterministic order for split configured deps (roll forward) Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. This is a roll forward of commit 7505d94c19727e3100ac5e16a960bff2cb324f23. The original changed failed on Windows because "ppc" wasn't recognized as a valid cpu: https://github.com/bazelbuild/bazel/issues/2191 This version uses "armeabi-v7a" instead. -- PiperOrigin-RevId: 141212457 MOS_MIGRATED_REVID=141212457
* Provide deterministic order for split configured deps (roll forward)Gravatar Greg Estren2016-12-06
| | | | | | | | | | | | | | | | | Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. This is a roll forward of commit 7505d94c19727e3100ac5e16a960bff2cb324f23. The original changed failed on Windows because "ppc" wasn't recognized as a valid cpu: https://github.com/bazelbuild/bazel/issues/2191 This version uses "armeabi-v7a" instead. -- PiperOrigin-RevId: 141185293 MOS_MIGRATED_REVID=141185293
* Rollback of commit 7505d94c19727e3100ac5e16a960bff2cb324f23.Gravatar Damien Martin-Guillerez2016-12-06
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Newly added test fail on Windows platform Fixes https://github.com/bazelbuild/bazel/issues/2191 *** Original change description *** Provide deterministic order for split configured deps. Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. -- PiperOrigin-RevId: 141167110 MOS_MIGRATED_REVID=141167110
* Provide deterministic order for split configured deps.Gravatar Greg Estren2016-12-06
| | | | | | | | | | Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. -- PiperOrigin-RevId: 141095973 MOS_MIGRATED_REVID=141095973
* Replace UnixGlob's package glob prefetching functionality with anGravatar Googler2016-12-02
| | | | | | | | optional method in FileSystem. Custom FileSystem implementations can use this to provide their own implementation of glob prefetching. -- MOS_MIGRATED_REVID=140736304
* Adding an option to set the digest function that everything uses. Minor ↵Gravatar Ola Rozenfeld2016-11-18
| | | | | | | | | | | | | refactoring: enabling potential fast digest computation of more than one digest function type. Usage: bazel --host_jvm_args="-Dbazel.DigestFunction=SHA1" build ... Ugliness: using a system property (a static non-final variable), because the better way to do it (a flag) would result in a much, much larger refactoring. More ugliness: I have updated the minimal amount of tests. A lot of tests are still relying on the default value of MD5. Ideally, they need to be updated as well. -- MOS_MIGRATED_REVID=139490836
* Re-use the precomputed universe key in WalkableGraphFactory#prepareAndGet.Gravatar Janak Ramakrishnan2016-11-17
| | | | | -- MOS_MIGRATED_REVID=139357569
* Aspects-on-aspects implementation.Gravatar Dmitry Lomov2016-11-15
| | | | | -- MOS_MIGRATED_REVID=139189444
* Implement build tag filtering.Gravatar Lukacs Berki2016-11-11
| | | | | | | If the --build_tag_filters option is specified, targets built will be filtered according to their tags (at least one included, none excluded) -- MOS_MIGRATED_REVID=138856195
* Update package lookup to check for files named BUILD.bazel before files namedGravatar John Cater2016-11-11
| | | | | | | | | | | BUILD. Fixes #552. RELNOTES[NEW]: Packages are defined in BUILD.bazel as well as BUILD files. -- MOS_MIGRATED_REVID=138828981
* Merge BlazeModule.getEnvironmentExtensions into serverInit / ServerBuilder.Gravatar Ulf Adams2016-11-02
| | | | | -- MOS_MIGRATED_REVID=137955061
* Fix uses of LocalRepositoryLookupFunction to work with JDK7.Gravatar John Cater2016-10-26
| | | | | -- MOS_MIGRATED_REVID=137257525
* Add new skyframe function to lookup the repository given a path, and use thatGravatar John Cater2016-10-25
| | | | | | | to report invalid package references. Fixes #1592. -- MOS_MIGRATED_REVID=137164164
* Accept valid relative symlinks in TreeArtifacts.Gravatar Rumou Duan2016-10-25
| | | | | -- MOS_MIGRATED_REVID=137072310
* Proper action output checks for TreeArtifacts. Instead of crashing Bazel, we ↵Gravatar Rumou Duan2016-10-19
| | | | | | | now handle failed TreeArtifact output checks gracefully. -- MOS_MIGRATED_REVID=136627086
* Fix Bazel-JDK7 breakage on CIGravatar Philipp Wollermann2016-10-19
| | | | | | | | | | src/test/java/com/google/devtools/build/lib/skyframe/TreeArtifactBuildTest.java:154: error: local variable normalOutput is accessed from within inner class; needs to be declared final touchFile(normalOutput); http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD-jdk7,PLATFORM_NAME=linux-x86_64/290/console -- MOS_MIGRATED_REVID=136588819
* Per action file caching for input TreeArtifact.Gravatar Rumou Duan2016-10-19
| | | | | -- MOS_MIGRATED_REVID=136475556
* Rollback of commit b776d6c12e952eb358c1a036cc9d93d8944c4c77.Gravatar Nathan Harmata2016-10-18
| | | | | | | *** Reason for rollback *** -- MOS_MIGRATED_REVID=136448178
* Don't bother getting the not-real FileStateValue for a path whose parent ↵Gravatar Nathan Harmata2016-10-18
| | | | | | | | | doesn't exist. In addition to saving a filesystem operation, this removes a source of a potential filesystem inconsistency. -- MOS_MIGRATED_REVID=136355008
* Rollback of commit 0c7a42a09d85ddffd9b860bcb31e4c43a00632c1.Gravatar Nathan Harmata2016-10-17
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** [] *** Original change description *** Slight refactor of ExternalFilesHelper: -Make FileType and ExternalFileAction public. -Have producers use ExternalFileAction, rather than a boolean, to specify the desired behavior. And a big change in semantics (doesn't affect Bazel): -Replace ExternalFileAction.ERROR_OUT with ExternalFileAction.ASSUME_NON_EXISTENT_AND_IMMUTABLE, which does what it sounds like. This new action, like the old ERROR_OUT, is _not_ used in Bazel. -- MOS_MIGRATED_REVID=136206810
* Make --watchfs a common command option.Gravatar Ulf Adams2016-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | Adding an options parameter to DiffAwareness#getCurrentView seems like the simplest way to achieve that. Alternatives considered: 1. Making the diff awareness modules stateful. However, I did not want to do so as I've also been working on improving the module API to reduce state, or at least to have a proper lifecycle management for any necessary state. 2. Making the watchFs flag a constructor parameter. However, that would also invalidate any implementations that don't use the flag (of which we have several). 3. Only passing in a single boolean flag instead of an options class provider; however, this is a more principled, futureproof API, which allows other modules / awareness implementations to use their own options. RELNOTES: --watchfs is now a command option; the startup option of the same name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs build. -- MOS_MIGRATED_REVID=136154395
* --watchfs for OSX: use kFSEventStreamCreateFlagNoDefer to receive event as ↵Gravatar Damien Martin-Guillerez2016-10-14
| | | | | | | | | | | | | | | | soon as they arrives See https://developer.apple.com/reference/coreservices/1455376-fseventstreamcreateflags/kfseventstreamcreateflagnodefer?language=objc Also added the integration test now it is no more flaky. Tested with `bazel test src/test/java/com/google/devtools/build/lib/skyframe:SkyframeTests --runs_per_test 10 --test_filter=com.google.devtools.build.lib.skyframe.MacOSXFsEventsDiffAwarenessTest --nocache_test_results` Fixes #1362. -- Change-Id: I42ceebd8c5a2e0156653b140ca049af45d2e1e80 Reviewed-on: https://bazel-review.googlesource.com/6613 MOS_MIGRATED_REVID=136078777