aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
* 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
* Inform SkyframeExecutor when a command starts.Gravatar janakr2017-09-19
| | | | PiperOrigin-RevId: 169179218
* Make ObjectCodecs.ClassKeyedBuilder more reasonableGravatar michajlo2017-09-19
| | | | | | | | | Not sure why we passed in Class<T>, ObjectCodec<? extends T> - it should really be the other way around, since ObjectCodec<T> should be able to serialize <? extends T>.... RELNOTES: None PiperOrigin-RevId: 169161061
* Project reorg: move *ConfiguredTarget to new configuredtargets/ pathGravatar gregce2017-09-18
| | | | | | | Exempt RuleConfiguredTarget in this change because that's liable to touch a billion files. PiperOrigin-RevId: 168929827
* Automatic code cleanup.Gravatar cushon2017-09-15
| | | | PiperOrigin-RevId: 168802886
* Remove deepExecRoot from BlazeDirectories. It is now the default. Also ↵Gravatar janakr2017-09-14
| | | | | | inline constructor that did ServerDirectories creation inline: don't pollute production code for tests' convenience. PiperOrigin-RevId: 168652349
* Open-source some more serialization codecs, and create a PrecomputedValue ↵Gravatar janakr2017-09-14
| | | | | | codec. Since PrecomputedValues can contain any value, give them access to an ObjectCodecs instance so we don't have to have a whitelist inside PrecomputedValueCodec. PiperOrigin-RevId: 168624137
* Lots more cleanup of "dynamic configurations" comments and test code.Gravatar gregce2017-09-14
| | | | PiperOrigin-RevId: 168607439
* Cleanup todo from static config removalGravatar gregce2017-09-14
| | | | PiperOrigin-RevId: 168583913
* Static config removal TODO cleanup.Gravatar gregce2017-09-14
| | | | PiperOrigin-RevId: 168583577
* Remove outdated references to static vs. dynamic configurations.Gravatar gregce2017-09-13
| | | | PiperOrigin-RevId: 168452997
* Remove unused class after removal of BazelConfigurationCollection.Gravatar gregce2017-09-13
| | | | | | Also pipe keepGoing back into initial configuration creation. PiperOrigin-RevId: 168412512
* Remove outdated defaultsToSelf.Gravatar gregce2017-09-12
| | | | | | Part of the static config cleanup effort. PiperOrigin-RevId: 168270713
* Drive-by clean-up: Make it slightly more obvious that one of the ↵Gravatar shreyax2017-09-12
| | | | | | | PackageFunction constructors is only used in tests and annotate the missing variable. RELNOTES: None. PiperOrigin-RevId: 168265593
* Toolchain providers are propagated in the ToolchainContext instance madeGravatar cpeyser2017-09-12
| | | | | | available from BuildViewTestCase#getRuleContext PiperOrigin-RevId: 168231020
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-09-08
| | | | | | | | PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 167901210
* Rule classes cannot request duplicate toolchains.Gravatar cpeyser2017-09-08
| | | | PiperOrigin-RevId: 167861778
* Update ContainingPackageLookupFunction to properly handle cases where aGravatar John Cater2017-09-07
| | | | | | | | | | path crosses into a local repository and correctly report the repository-relative package. Fixes #3553. Change-Id: Ib912e69d546fb740ef8fe4c426dba30fa7776bda PiperOrigin-RevId: 167760229
* RuleContext instances obtained through BuildViewTestCase#getRuleContext have aGravatar cpeyser2017-09-07
| | | | | | ToolchainContext. PiperOrigin-RevId: 167729868
* Update PackageLookupFunction to report the corrected label when aGravatar John Cater2017-09-07
| | | | | | | | | package crosses into a local repository. Part of #3553. Change-Id: Ib21de0a1843e72055c53ef34922d69290aee72ed PiperOrigin-RevId: 167726591
* More BUILD file refactorings.Gravatar philwo2017-09-06
| | | | | | | | | Split collect, concurrent, vfs, windows into package-level BUILD files. Move clock classes out of "util", into their own Java package. Move CompactHashSet into its own Java package to break a dependency cycle. Give nestedset and inmemoryfs their own package-level BUILD files. PiperOrigin-RevId: 167702127
* Update LocalRepositoryLookupFunction to also return the path of theGravatar John Cater2017-09-06
| | | | | | | | | repository. Part of #3553. Change-Id: Id8b4958844b2ad7b5ce4b2ea00a91b6b22acc025 PiperOrigin-RevId: 167589110
* Now really rename all logger instances to "logger".Gravatar lberki2017-09-05
| | | | | | | Turns out, my previous search expression didn't find the ones that were not "final LOG" or "final log" and a surprising number of places were missing the "final" tag. RELNOTES: None. PiperOrigin-RevId: 167547507
* Rename all logger instances to "logger" (instead "LOG" or "log").Gravatar lberki2017-09-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 167505493
* Fix BazelPackageLoader to handle local repositories, and clean up API byGravatar jcater2017-09-01
| | | | | | removing unused methods and making the Builder more general. PiperOrigin-RevId: 167150478
* Stop printing out Exception class names to the user while usingGravatar kush2017-08-31
| | | | | | | SkyframeAwareAction.ExceptionBase. RELNOTES: None PiperOrigin-RevId: 167030688
* Add check that the exec and target platform labels actually provide a ↵Gravatar John Cater2017-08-31
| | | | | | | | | PlatformInfo provider. Fixes #3631. Change-Id: I78ed8905e18e3c11c01d6e30512c10491a5ba0f1 PiperOrigin-RevId: 167019469
* Error reporting for invalid dynamic configurationsGravatar cparsons2017-08-31
| | | | | | | also, AppleConfiguration no longer throws NPE with invalid cpu. RELNOTES: None. PiperOrigin-RevId: 167013760
* Stop blaze crash due to a symlink cycle or unbounded expansion encounteredGravatar kush2017-08-30
| | | | | | | while traversing filesets. RELNOTES: None PiperOrigin-RevId: 166913262
* Make PackageLookupValue#key(PathFragment) public.Gravatar nharmata2017-08-30
| | | | | RELNOTES: None PiperOrigin-RevId: 166907799
* Change Identifier#boundNames to #boundIdentifiers.Gravatar fzaiser2017-08-28
| | | | | RELNOTES: None PiperOrigin-RevId: 166704851
* Automated rollback of commit bb0aba3e91b603bf96d4e214a3886d1f47c3d90a.Gravatar janakr2017-08-24
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Publishing duplicate build events for tests. *** Original change description *** Request test artifacts to be built in parallel with running the test. In cases where not all test artifacts are needed to run the test, this allows for greater parallelism in the build. We need to inject the request for the test to be run into the TargetCompletion function, so that it can properly process any errors. Thanks to nharmata@ for suggesting this. MEMORY: One additional Skyframe node and 2 edges for each test to be run (sharded tests still only count as one). So with 500 test target... *** PiperOrigin-RevId: 166307568
* Request test artifacts to be built in parallel with running the test.Gravatar janakr2017-08-24
| | | | | | | | | In cases where not all test artifacts are needed to run the test, this allows for greater parallelism in the build. We need to inject the request for the test to be run into the TargetCompletion function, so that it can properly process any errors. Thanks to nharmata@ for suggesting this. MEMORY: One additional Skyframe node and 2 edges for each test to be run (sharded tests still only count as one). So with 500 test targets, 100K is a conservative estimate of memory usage. PiperOrigin-RevId: 166256545
* Parallelize target pattern preloading (used by 'blaze query').Gravatar nharmata2017-08-22
| | | | | RELNOTES: None PiperOrigin-RevId: 165973661
* Minor change to the ActionOnIOExceptionReadingBuildFile interface.Gravatar nharmata2017-08-22
| | | | | RELNOTES: None PiperOrigin-RevId: 165967625
* Initial (partial) implementation of configured target query. Activated by ↵Gravatar janakr2017-08-21
| | | | | | | | | | | | | | | | | | | | | passing the --post_build_query flag to a build command, with a query expression as the argument. Bazel then executes this query on the configured target graph as constructed by the build command. Since the prepare graph -> query workflow is how SkyQueryEnvironment works, this is mostly just copying that. Main missing features/code cleanups: * Recursive target patterns (/...) are not supported. * There is no way to specify the configuration of the targets in your query. * Configuration output is totally opaque (just the hash, or null if no configuration). * More generally, no output options. * Some features (visibility, label attrs) not supported. * No edge filtering (host deps, implicit deps). * Aspects are totally ignored. * Graceful failure on errors, edge cases, incompatible flags (like the TAP flags that discard edges). * Code hygiene issues (calling test-only method to get to Skyframe graph, some code duplication across ConfiguredTargetQueryEnvironment and SkyQueryEnvironment). Most of the features I plan to leave to rules-side people, since I think they won't be too hard for a general Blaze developer to implement, and designing the right features and user interfaces for these things is better left to the rules side. PiperOrigin-RevId: 165747829
* Replace TransitionApplier interface with a dedicated class.Gravatar gregce2017-08-21
| | | | | | | | | | | | | | | This accomplishes a few goals: 1. Removes the outdated BuildConfiguration.StaticConfigurationApplier code. 2. Removes the TransitionApplier abstraction completely. This was an awkward bridge meant to support both static and dynamic implementations. 3. Moves transition logic to its own dedicated class: ConfigurationResolver. This no longer belongs in BuildConfiguration, which we ultimately want to become a simple <key, value> map. Part of the static config cleanup effort. PiperOrigin-RevId: 165736955
* Remove BuildConfiguration.useDynamicConfigurations.Gravatar gregce2017-08-18
| | | | | | | | This is always true. Part of the static config cleanup effort. PiperOrigin-RevId: 165628823
* Properly handle some values that can be null in AppleCommandLineOptions.Gravatar janakr2017-08-18
| | | | PiperOrigin-RevId: 165622047
* Remove ConfigurationCollection{Function,Value}, ↵Gravatar gregce2017-08-18
| | | | | | | | BuildConfigurationCollection.Transitions. Part of the static config cleanup effort. PiperOrigin-RevId: 165607492
* Open-source Skyframe serialization, and make AppleConfiguration serializable ↵Gravatar janakr2017-08-18
| | | | | | as a pilot. Currently not hooked up to anything, but will be shortly. PiperOrigin-RevId: 165583517
* Remove ConfigurationCollectionFactory as part of the static config cleanup.Gravatar gregce2017-08-18
| | | | PiperOrigin-RevId: 165578449
* Change WalkableGraphFactory#prepareAndGet to take multiple SkyKeys as graph ↵Gravatar Googler2017-08-17
| | | | | | | | | | roots It also changes a few accessors of utility methods in Skyframe library. It refactors the QueryExpressionMapper to use a general QueryExpressionVisitor. RELNOTES: None PiperOrigin-RevId: 165534908
* Remove ConfigurationFactory as part of the static configuration cleanup.Gravatar gregce2017-08-17
| | | | PiperOrigin-RevId: 165478994
* Fix skyframe-native filesets to honor 'excludes' while in a directory traversal.Gravatar kush2017-08-17
| | | | | RELNOTES: None PiperOrigin-RevId: 165465128
* Set a bit in ActionExecutedEvent indicating if a failure occurred before the ↵Gravatar janakr2017-08-11
| | | | | | action actually executed. PiperOrigin-RevId: 164917959
* Pass List<ConfigurationFragmentFactory> to SkyframeExecutor instead of ↵Gravatar gregce2017-08-11
| | | | | | | | | | ConfigurationFactory. This is a prerequisite to removing ConfigurationFactory (which is only used for static configurations). We still need List<ConfigurationFragmentFactory> to supply ConfigurationFragmentFunction. Eventually even that will go away (for fully trimmed builds). But we're not there yet. PiperOrigin-RevId: 164890139
* Move OutputService to lib.skyframeGravatar ulfjack2017-08-11
| | | | | | | | | | | This isn't ideal, but is the fastest way to split analysis, execution, and rules into separate java libraries, with lib.skyframe still being in the analysis library. Ideally, we'd split up the lib.skyframe package, move the analysis stuff to the analysis library, the execution stuff to the execution library, and so on. That wouldn't require us moving OutputService out of lib.exec. PiperOrigin-RevId: 164856998
* Move core test classes to lib.analysis.testGravatar ulfjack2017-08-11
| | | | | | | | These are depended upon by analysis code, so need to live in the same library as lib.analysis. Moving them here makes it possible to split the build-base library into separate libraries for analysis, execution, and rules. PiperOrigin-RevId: 164847161
* Remove --experimental_dynamic_configs=off.Gravatar gregce2017-08-10
| | | | | | | | | | | | This is the first in a series of changes stripping out Bazel's static configuration code. This change removes the ability to request static configurations but not the (now orphaned) logic behind them. Because that logic is all over the code base, it will be removed in layers in followup changes. PiperOrigin-RevId: 164769846