aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
...
* Remove dead code - unused method in PackageManager interfaceGravatar Ulf Adams2017-02-09
| | | | | | -- PiperOrigin-RevId: 147018240 MOS_MIGRATED_REVID=147018240
* Fix spelling mistake.Gravatar Nathan Harmata2017-02-09
| | | | | | -- PiperOrigin-RevId: 146949259 MOS_MIGRATED_REVID=146949259
* 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
* Adds abstractions for include processing to CppSemanticsGravatar Googler2017-02-07
| | | | | | -- PiperOrigin-RevId: 146694092 MOS_MIGRATED_REVID=146694092
* Improve the error message added in commit ↵Gravatar Lukacs Berki2017-02-02
| | | | | | | | 41ab6db797bac30c8e39fc705254fef329b6fdbc . -- PiperOrigin-RevId: 146341606 MOS_MIGRATED_REVID=146341606
* 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
* Simplify action input discovery by removing ↵Gravatar Lukacs Berki2017-01-31
| | | | | | | | | | Action#getInputsWhenSkippingInputDiscovery(). This has the side effect of always allowing new inputs to be discovered when Action#discoversInputs() return true, but since those actions are very few and have mostly to do with C++, I think it's an acceptable tradeoff for th ecode being that much simpler. -- PiperOrigin-RevId: 146098150 MOS_MIGRATED_REVID=146098150
* Fix error handling in WorkspaceFile/WorkspaceASTGravatar Kristina Chodorow2017-01-30
| | | | | | -- PiperOrigin-RevId: 145818492 MOS_MIGRATED_REVID=145818492
* Add dependency for external files to the corresponding RepositoryDirectoryValue Gravatar Damien Martin-Guillerez2017-01-26
| | | | | | | | | | | | | | | | Previously we were adding a dependency to the rule itself, however the repository itself can depends on further dependencies (environment, template files, ...) with Skylark repositories. Not invalidating when those change was causing weird invalidation issues that were shown with the invalidation on environment (basically a refetch of the repository on environment invalidation would not cause an invalidation of the corresponding package, the next call would not have invalidation of the repository but would see the change in the build files...). -- Change-Id: I8945d9885e6390734ba02ccc6c3c6ca639fcec35 Reviewed-on: https://cr.bazel.build/8137 PiperOrigin-RevId: 145675258 MOS_MIGRATED_REVID=145675258
* Support mapping of Paths to URIsGravatar Klaus Aehlig2017-01-18
| | | | | | | | | | | Bazel-created files (like log files of test runs) are internally reported as Paths. However, this is not always the most useful representation of the location of that artifact for a consumer of build events. Therefore, support a mapping of paths to more useful URIs. -- PiperOrigin-RevId: 144843525 MOS_MIGRATED_REVID=144843525
* Change TargetContext.findDirectPrerequisite from config1 == config2 to ↵Gravatar Greg Estren2017-01-18
| | | | | | | | | | config1.equals(c2). This fixes an obscure bug between dynamic configurations, host configuration caching, and Skyframe skyKey interning that makes Bazel crash under certain sequences of builds. See changes for details. -- PiperOrigin-RevId: 144766296 MOS_MIGRATED_REVID=144766296
* Be very deliberate about the concept of a TargetPattern's "directory".Gravatar Nathan Harmata2017-01-16
| | | | | | -- PiperOrigin-RevId: 144494739 MOS_MIGRATED_REVID=144494739
* Fix a null check in ActionMetadataHandler.Gravatar Kush Chakraborty2017-01-16
| | | | | | -- PiperOrigin-RevId: 144444493 MOS_MIGRATED_REVID=144444493
* Log the IOException when an output was not successfully created. It's ↵Gravatar Janak Ramakrishnan2017-01-13
| | | | | | | | possible the exception has information we've been suppressing. -- PiperOrigin-RevId: 144405370 MOS_MIGRATED_REVID=144405370
* Log if dangling symlink is found. This is an odd choice of thing to log, but ↵Gravatar Janak Ramakrishnan2017-01-13
| | | | | | | | shouldn't come up very often, except in the linked bug. -- PiperOrigin-RevId: 144367142 MOS_MIGRATED_REVID=144367142
* Encapsulate the required provider logic in RequiredProviders class.Gravatar Dmitry Lomov2017-01-10
| | | | | | | | | For now, only for aspects, but eventually expand to Attribute's mandatory providers as well. -- PiperOrigin-RevId: 144063369 MOS_MIGRATED_REVID=144063369
* Extract a set of advertised providers into a separate class.Gravatar Dmitry Lomov2017-01-10
| | | | | | -- PiperOrigin-RevId: 143991903 MOS_MIGRATED_REVID=143991903
* Provide Skylark imports, even if the package has some errors.Gravatar Laurent Le Brun2017-01-05
| | | | | | | | | | | Since we evaluate the BUILD file despite errors (e.g. parse errors), we should provide the .bzl dependencies to the BUILD file. This change removes some confusing/irrelevant error messages. -- PiperOrigin-RevId: 143696291 MOS_MIGRATED_REVID=143696291
* Fix cycle detection between .bzl files.Gravatar Laurent Le Brun2017-01-05
| | | | | | | | | The code assumed that the last element before a cycle was a BUILD file. It can also be a .bzl file. -- PiperOrigin-RevId: 143673940 MOS_MIGRATED_REVID=143673940
* Improve cycle reporting error message.Gravatar Laurent Le Brun2017-01-04
| | | | | | -- PiperOrigin-RevId: 143547986 MOS_MIGRATED_REVID=143547986
* Make "profile --html --html_details" work again.Gravatar Lukacs Berki2017-01-03
| | | | | | | | The start time of critical path component wasn't recorded correctly since #getStartWallTimeMillis() didn't work right. However, since profiler tasks store nanotime anyway, it's pointless to try to convert back and forth. -- PiperOrigin-RevId: 143438289 MOS_MIGRATED_REVID=143438289
* 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
* Remove dead code referencing deleted "suites" attribute.Gravatar Greg Estren2016-12-21
| | | | | | | | | This used to be how test_suites depended on other test_suites. Now they just go in "tests". -- PiperOrigin-RevId: 142607603 MOS_MIGRATED_REVID=142607603
* Introduce a distinguisher for cpu value as set in --experimental_multi_cpu.Gravatar Cal Peyser2016-12-21
| | | | | | | | | This is required for a configuration transtion to set cpu. Without a distinguisher, such a transition will lead to two identical configurations. -- PiperOrigin-RevId: 142603930 MOS_MIGRATED_REVID=142603930
* Names of extra-action protos now take into account all aspect names.Gravatar Dmitry Lomov2016-12-16
| | | | | | | | | | | | | If an Aspect registered an action that an extra-action is shadowing, its name is used when creating the extra-action's ID and name. Since recently, an aspect can see other aspects applied to the same target. This CL record the names of other aspects applied to the target as well, disambiguating the action owners. -- PiperOrigin-RevId: 142264153 MOS_MIGRATED_REVID=142264153
* Fix an analysis phase performance regression with dynamic configurations.Gravatar Greg Estren2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The short story is that env.valuesMissing() returns true without regard for which Skyframe evaluation missed values. In other words, given: env.getValues(missingValues); // Not all values ready. env.getValues(presentValues); // All value ready. if (env.valuesMissing()) { return null; } this returns null even if "env.getValues(presentValues)" has all its results. This doesn't have correctness consequences, but it does have (major) performance consequences, particularly in ConfiguredTargetFunction. The quick reason is that the successful call can still do useful followup work, but that gets short-circuited if the function nulls out early. See the code changes for full details. This eliminates a 30% hit on analysis time with dynamic configurations. With this change, that goes down to 0. The takeaway: ConfiguredTargetFunction is both unintuitively complex and performance-critical. C'est la vie. -- PiperOrigin-RevId: 142044069 MOS_MIGRATED_REVID=142044069
* Fixed PackageLookupFunction to check for all possible build file names when ↵Gravatar John Cater2016-12-12
| | | | | | | | | | | | loading external repositories. Fixes #2198. -- Change-Id: Ife0232f8e4652a90bc3b7dceec6e67312a142879 Reviewed-on: https://cr.bazel.build/7691 PiperOrigin-RevId: 141771126 MOS_MIGRATED_REVID=141771126
* Description redacted.Gravatar Googler2016-12-12
| | | | | | -- PiperOrigin-RevId: 141561079 MOS_MIGRATED_REVID=141561079
* 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
* Fix test configured target creation code that was dropping split deps.Gravatar Greg Estren2016-12-06
| | | | | | | | | | | | | | | Short story: Dependency -> BuildConfiguration maps can have multiple values because of split transitions. This is unfortunately one of those instances where the test logic is forked from production. So this doesn't actually demonstrate bugs in production code. We already have tests in ConfigurationsForTargetsTest that directly check the production logic. So this cl's primary value is to unbreak tests that depend on the forked logic. -- PiperOrigin-RevId: 141094830 MOS_MIGRATED_REVID=141094830
* Add 'aspect_id' for to identify aspects that has been applied to the target.Gravatar Dmitry Lomov2016-12-05
| | | | | | | | | | | | | | | | | | | Add a concept of aspect_id: an unique string that identifies a propagating aspect (aspect class + parameters). This string is designed to be: - Unique for each aspect - human-readable for debugging purposes - not easily parsable. Skylark API: - `ctx.aspect_id` returns an identifier of the current aspect inside aspect implementation function - `Target.aspect_ids` return a list of aspect ids for aspects applied to a given Target (https://www.bazel.io/versions/master/docs/skylark/lib/Target.html) -- PiperOrigin-RevId: 141057865 MOS_MIGRATED_REVID=141057865
* Make build events correctly report target expansionGravatar Klaus Aehlig2016-12-05
| | | | | | | | | | | In particular, correctly report the expansion of a test suite even if only requested to build (but not test). -- Change-Id: Ia25305a4f5ed53118cbb1970a8055d156e8e50be Reviewed-on: https://cr.bazel.build/7535 PiperOrigin-RevId: 141027655 MOS_MIGRATED_REVID=141027655
* Fix bug in configuration creation logic that wrongly trims notrim configs.Gravatar Greg Estren2016-12-05
| | | | | | | | Without this, many Bazel tests fail with --experimental_dynamic_configs=notrim_partial. -- PiperOrigin-RevId: 140873563 MOS_MIGRATED_REVID=140873563
* Null out perBuildSyscallCache after analysis is finished to save memory ↵Gravatar Janak Ramakrishnan2016-12-02
| | | | | | | | during execution. -- PiperOrigin-RevId: 140864295 MOS_MIGRATED_REVID=140864295
* Prune modules when building modules themselves to reduce build times shortenGravatar Googler2016-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | critical paths. When the inputs of a module M are reduced to a set S, then that same set S also needs to be supplied to compile something that uses M. To do this, input discovery is divided into two stages. For each CppCompileAction, the first stage discovers the necessary modules (M above). These are then added as inputs to ensure that they are built. The second stage then finds all the modules (S above) that are required to use those and also adds them as inputs. For now, the new behavior is guarded by a new flag --experimental_prune_more_modules. This is currently implemented by reading the .d files of used modules add adding all their module dependencies. There are two noteworthy alternatives: 1. Hack up input discovery to understand modules, e.g. if a modular header is hit, continue scanning from all it's headers. However, this seems very brittle and a lot of additional information would have to be passed to the input discovery. 2. Directly pass the results from input discovery of one CppCompileAction to another one. However, this seems to tightly couple the execution of different CppCompileActions and might lead to a mess of different states, more memory consumption, etc. With the current implementation, there is a bit of runtime overhead of reading the .d files (many times). This could potentially be improved by caching the results. However, even without this caching, the runtime overhead is limited (<10%) for all builds I have tried (I have tried with builds where all the compile results are already in the executor's cache. -- MOS_MIGRATED_REVID=140793217
* Allow aspects to specify multiple sets of required providers to match ↵Gravatar Rumou Duan2016-12-01
| | | | | | | against rules. Aspects can attach to a rule if at least one set of required providers are present on the rule. -- MOS_MIGRATED_REVID=140605023
* Remove isSkylark and eval from Environment.Gravatar Laurent Le Brun2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140371603
* Provide AspectDescriptor to ConfiguredAspect.Gravatar Dmitry Lomov2016-11-29
| | | | | | | | Also clean up the setting of aspect name in ConfiguredAspect and AspectDefintion - it is now obtained from the AspectClass. -- MOS_MIGRATED_REVID=140357052
* Use BlazeInterner's chosen concurrency level in InternerWithPresenceCheck's ↵Gravatar Nathan Harmata2016-11-28
| | | | | | | internal ConcurrentMap. -- MOS_MIGRATED_REVID=140253038
* Refactor LegacyLoadingPhaseRunner to be more like SkyframeLoadingPhaseRunner.Gravatar Ulf Adams2016-11-22
| | | | | | | | This is in preparation for extracting some common reporting code, and also a step towards interleaving target pattern eval and config creation. -- MOS_MIGRATED_REVID=139890205
* Implement 'output_groups' provider.Gravatar Dmitry Lomov2016-11-21
| | | | | | | | | | This behavior - that 'output_groups' is a provider available on targets and aspects - has been accidental, but people already depend on it. This CL keeps that behavior, while fixing the bug that two aspects could not both provide output groups. -- MOS_MIGRATED_REVID=139578378
* Allow labels in the '--aspects' parameter.Gravatar Dmitry Lomov2016-11-21
| | | | | -- MOS_MIGRATED_REVID=139573590
* Run the analysis phase with as many threads as the user wants. In order to ↵Gravatar Janak Ramakrishnan2016-11-18
| | | | | | | | | avoid memory blow-up intra-configured-target analysis, use a semaphore to ensure that CPU-bound work only occurs on #CPU-many threads. RELNOTES: Use --loading_phase_threads to control the number of threads used during the loading/analysis phase. -- MOS_MIGRATED_REVID=139477645
* Cache all previously computed values in ↵Gravatar Janak Ramakrishnan2016-11-17
| | | | | | | | | SkyQueryEnvironment#beforeEvaluateQuery if possible to save on latency for small queries. This assumes that if the graph is up to date, then the data in SkyQueryEnvironment is also up to date. It also assumes that a ForkJoinPool remains usable until #shutdownNow is called. -- MOS_MIGRATED_REVID=139386363