aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
...
* Fix a couple of bugs related to error handling for top-level aspects.Gravatar Ulf Adams2016-01-20
| | | | | -- MOS_MIGRATED_REVID=112561390
* Support unreadable filesGravatar Michajlo Matijkiw2016-01-20
| | | | | -- MOS_MIGRATED_REVID=112507181
* Allow opaque OptionsClassProvider to be passed around in BuildDriver#meta et ↵Gravatar Nathan Harmata2016-01-20
| | | | | | | all so that custom implementations can have custom options passed around. -- MOS_MIGRATED_REVID=112502778
* General cleanup for the configured target / aspect creation code.Gravatar Ulf Adams2016-01-19
| | | | | | | | | | | | | | - update some comments - add some comments to make it easier to follow - delete some dead code, in particular the SkyframeDependencyResolver can never be null; remove an non-applicable @Nullable annotation I'm trying to figure out how the error handling code works, in order to add support for interleaved loading+analysis, which requires handling loading errors in this code path. -- MOS_MIGRATED_REVID=112456674
* Disallow loads from external repos in WORKSPACE files. Currently, attempting ↵Gravatar John Field2016-01-18
| | | | | | | | | to do such a load will result in a skyframe circular dependency exception. As a side effect of this change, SkylarkImportFailedExceptions thrown by SkylarkImportLookupFunction are now caught by PackageFunction and wrapped and rethrown as a PackageFunctionException. Previously, the first exception wasn't caught, generating an uncaught exception error at top level. -- MOS_MIGRATED_REVID=112328755
* Refactor action output dumping to go through a single method.Gravatar Ulf Adams2016-01-15
| | | | | | | | | | | | | This is in preparation for moving the output dumping to the Reporter for two reasons: - we're currently relying on there being a Reporter which locks on itself; i.e., this code is tightly coupled with the Reporter code - the current Blaze output is confusing; we first print an info event, then the actual output, and then an error event - putting the Reporter in control allows us to fix that -- MOS_MIGRATED_REVID=112240684
* Display parsing errors for WORKSPACE filesGravatar Kristina Chodorow2016-01-15
| | | | | | | | | | | | | Previously, for some types of errors, you'd just see "WORKSPACE file could not be parsed" if there was a syntax error (instead of what the syntax error was). Change-Id: Ia278cf23b79f8daba02917cdfb4cc515a87080b1 -- Change-Id: Ia278cf23b79f8daba02917cdfb4cc515a87080b1 Reviewed-on: https://github.com/bazelbuild/bazel/pull/774 MOS_MIGRATED_REVID=112190322
* Add a few other Label.resolveRepositoryRelative() calls to make select() ↵Gravatar Lukacs Berki2016-01-15
| | | | | | | | | | | statements work in remote repositories. This work is somewhat sisyphean; the principled thing to do would be to just do this resolution when labels are parsed. Fixes #783. -- MOS_MIGRATED_REVID=112137996
* Remove some dead code.Gravatar Ulf Adams2016-01-14
| | | | | | | | | | | | The ConfiguredTargetFunction can only throw a NoSuch{Target,Package}Exception if it's run for a non-existent target. However, it will never request a CT for a non-existent target: all labels are run through DependencyResolver in order to determine the configuration transition, which requires loading the target. If it doesn't exist, the label is never returned from the DependencyResolver, and errors are swallowed (we rely on the loading phase to report the error). -- MOS_MIGRATED_REVID=112127012
* Use AutoProfiler in SkyQueryEnvironment#init. Also augment the ↵Gravatar Nathan Harmata2016-01-14
| | | | | | | WalkableGraphFactory interface with a hook to inform the factory when the WalkableGraph is done being used. -- MOS_MIGRATED_REVID=112074284
* Store excluded subdirectories as PathFragment instead of String inside ↵Gravatar Janak Ramakrishnan2016-01-14
| | | | | | | | | TargetPatternKey, since that is what is needed by callers. Also, since the PathFragments come from packages, they are guaranteed to be well-formed, so the checks we were doing were unnecessary. -- MOS_MIGRATED_REVID=112059930
* Inside findTargetsBeneathDirectory(), invoke the callback with all targets ↵Gravatar Eric Fellheimer2016-01-11
| | | | | | | from the current package batch. -- MOS_MIGRATED_REVID=111858978
* Add the ability to customize the bazel client's exit code used when the ↵Gravatar Nathan Harmata2016-01-08
| | | | | | | bazel server exits abruptly. -- MOS_MIGRATED_REVID=111641619
* Stream TargetPattern#eval implementations' results to a callback rather than ↵Gravatar Janak Ramakrishnan2016-01-07
| | | | | | | | | returning a ResolvedTargets set. This is the second step in a series to allow processing large sets of targets in query target patterns via streaming batches rather than all at once. This should also be a functional no-op. -- MOS_MIGRATED_REVID=111611858
* Split PrepareDepsOfTargetsUnderDirectory into two parts, one which does the ↵Gravatar Janak Ramakrishnan2016-01-07
| | | | | | | directory traversal and package loading, and the other which requests deps on all the transitive targets. We need values from the first half, but the second half can fail to evaluate because of a target cycle. By splitting them, we ensure that there will be values in the graph, so we can get the targets below a directory even if there are cycles present. -- MOS_MIGRATED_REVID=111609889
* Stream results of targets below directory to a callback rather than ↵Gravatar Janak Ramakrishnan2016-01-07
| | | | | | | | | returning a ResolvedTargets set. This is the first step in a series to allow processing large sets of targets in query target patterns via streaming batches rather than all at once. This should be a functional no-op. -- MOS_MIGRATED_REVID=111609309
* In SkyQueryEnvironment, don't silently give up when there's a cycle in the ↵Gravatar Janak Ramakrishnan2016-01-07
| | | | | | | graph. We can compute the universe target patterns outside of skyframe, which is the only reason we need the value we were requesting. Giving up was preventing us from evaluating "..." patterns even if the "..." pattern didn't contain any cycles itself. -- MOS_MIGRATED_REVID=111605976
* Stop parsing the WORKSPACE file when a parse error is detectedGravatar Kristina Chodorow2016-01-07
| | | | | | | | | | Parsing was continuing and tried to load skylark extensions even though an error was present in the WORKSPACE file. Fixes #724 -- MOS_MIGRATED_REVID=111534382
* Add bulk package lookup for use during target pattern resolution.Gravatar Eric Fellheimer2016-01-04
| | | | | -- MOS_MIGRATED_REVID=111130363
* Allow Skylark rules and aspects to contribute to output groups.Gravatar Dmitry Lomov2015-12-28
| | | | | -- MOS_MIGRATED_REVID=110840166
* Use batch lookups in graph-backed recursive provider for greater efficiency.Gravatar Eric Fellheimer2015-12-28
| | | | | -- MOS_MIGRATED_REVID=110797095
* Enable label-based Skylark loading. In particular, such labels may reference ↵Gravatar John Field2015-12-22
| | | | | | | | | | | | | | | | | | | files in external repositories. In addition: - Cleaned up and refactored some tests to reflect the new loading behavior. Deferred to future CLs: - Updating Bazel Skylark documentation to reflect the new load form. - Enabling command-line loading of Aspects via labels. RELNOTES: Skylark load statements may now reference .bzl files via build labels, in addition to paths. In particular, such labels can be used to reference Skylark files in external repositories; e.g., load("@my_external_repo//some_pkg:some_file.bzl", ...). Path-based loads are now deprecated and may be disabled in the future. Caveats: Skylark files currently do not respect package visibility; i.e., all Skylark files are effectively public. Also, loads may not reference the special //external package. -- MOS_MIGRATED_REVID=110786452
* Open source LoadingPhaseRunnerTest and its Skyframe companion.Gravatar Ulf Adams2015-12-21
| | | | | | | | | | I had to make a small change to ExternalFilesHelper. The Bazel test setup creates a remote repository for the tools, so we always have external files, incl. during loading. However, some of the tests don't setup an output directory, but instead pass null, which would lead to a crash. -- MOS_MIGRATED_REVID=110669993
* Implement aspect attributes and expose them to aspect implementation function.Gravatar Dmitry Lomov2015-12-16
| | | | | -- MOS_MIGRATED_REVID=110356954
* Only depend on the WORKSPACE file for external files that are under the ↵Gravatar Lukacs Berki2015-12-16
| | | | | | | | | | | | | | | external/ directory, i.e. were created by Bazel. This avoids a cycle that arose when a file is load()ed from the WORKSPACE file that is reached through a symlink to an external directory: * The WORKSPACE file depends on the package lookup node of the .bzl file * The package lookup node (transitively) depends on wherever the symlink points * The target of the symlink is an external file and as such, it depends on the WORKSPACE file This will probably be, erm, interesting to solve when we get as far as to load stuff from external repositories in the WORKSPACE file, but we are just not there yet. -- MOS_MIGRATED_REVID=110344658
* Clean up the configuration-related code paths a bit.Gravatar Ulf Adams2015-12-11
| | | | | | | | | - If we have a class object available, we can use .cast(Object) - Only store the required options objects in CppConfigurationParameters rather than keeping the entire BuildOptions -- MOS_MIGRATED_REVID=109981236
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Shuffle around all the constants related to the name of the //external ↵Gravatar Lukacs Berki2015-12-10
| | | | | | | | | package and the prefix of external packages in the execroot. This is in preparation for renaming that path segment from "external" to "bazel-external" so that we can provide a symlink to it from the source tree so that the source tree looks like the execroot. -- MOS_MIGRATED_REVID=109882753
* Now that external files are not always treated as immutable, eliminate the ↵Gravatar Lukacs Berki2015-12-10
| | | | | | | "overlaid BUILD files" hack in RepositoryValue. -- MOS_MIGRATED_REVID=109877252
* Refactor external repository support significantly to solve a number of issues.Gravatar Lukacs Berki2015-12-09
| | | | | | | | | | | | | | | In particular: - Separate the implementation of maven_server into a RepositoryFunction and one that creates the MavenServerValue (ideally, maven_server wouldn't exist but we'll have to make to for the time being) - Refactor the logic of determining whether an external repository needs to be re-fetched to RepositoryDelegatorFunction - Make RepositoryFunctions not be SkyFunctions anymore (they are called from RepositoryDelegatorFunction, though, who *is* a SkyFunction) - Add a Skyframe dirtiness checker that makes --nofetch RepositoryValues not be cached - Add a bunch of test cases and javadoc There is only one wart that I know of that remains: changes to BUILD files of new_* repository rules that weren't refetched when their RepositoryValue was initiall created on server restart won't take effect. This is because we don't add those BUILD files to the created RepositoryValue. This will fix itself once the ExternalFilesHelper refactoring is submitted. -- MOS_MIGRATED_REVID=109768345
* Fail build gracefully if an action discovers unexpected inputs.Gravatar Janak Ramakrishnan2015-12-08
| | | | | | | | | | | | | | | | | | | Blaze discovers inputs for some actions when running with some strategies. Those actions should not discover additional inputs when they run, regardless of the strategy they end up using. There are now no known legitimate cases of such additional input discovery, so we should reinstate this check and find new ones :) We also change the failure mode to be a normal error rather than a crash. This error does indicate a tooling issue, and a small chance of incorrect builds, but it doesn't create such an inconsistent state that a crash is warranted. -- Change-Id: I5d498d2fc1c5e23bfb5d77971f866c2027cbf03a Reviewed-on: https://bazel-review.googlesource.com/#/c/2500/3 MOS_MIGRATED_REVID=109703508
* Follow-up on f9fdc8dfced8b2b14561720623126a91e04b22cb -- reinstate ↵Gravatar Janak Ramakrishnan2015-12-08
| | | | | | | short-circuit check when all package paths have good diff information and no external files have been seen. -- MOS_MIGRATED_REVID=109703164
* Rollback of commit ca1b21ac6d8a58041db822725b42de151b163dee.Gravatar Ulf Adams2015-12-08
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke some alipo builds. I had to leave in the change to TransitiveTargetFunctionTest, which is relied upon by follow-up CLs. *** Original change description *** Pre-trim build options for all remaining calls to ConfigurationFragment.key. Move the trimming logic into key() itself to: a) eliminate code redundancy b) guarantee all future calls to key() also do this. -- MOS_MIGRATED_REVID=109683849
* Don't treat external files as immutableGravatar Kristina Chodorow2015-12-08
| | | | | | | | | Fixes #352. RELNOTES: Files in external repositories are now treated as mutable, which will make the correctness guarantees of using external repositories stronger (existent), but may cause performance penalties. -- MOS_MIGRATED_REVID=109676408
* Cleanup: use int instead of Integer in the RecursiveFilesystemTraversal classes.Gravatar Laszlo Csomor2015-12-07
| | | | | -- MOS_MIGRATED_REVID=109579490
* RecursiveFilesystemTraversalFunction now tracks changes in symlinked directory.Gravatar Laszlo Csomor2015-12-07
| | | | | | | | | | | | We achieve this by computing the directory symlink's metadata hash, which the Google-internal Fileset rule writes in the fileset_manifest file, from the hashes of all files under it. This adds complexity but is necessary, because the symlink's FileStateValue remains the same even if the directory's contents change, so the FileStateValue alone is inadequate to compute the metadata for the fileset_manifest. -- MOS_MIGRATED_REVID=109577723
* Refactor: ResolvedFile.getMetadata is now .getMetadataHash.Gravatar Laszlo Csomor2015-12-07
| | | | | | | | | | This is a subtle change that'll go a long way: there's a bug in the handling of directory symlinks (changes in the link target are not picked up) which I'll fix by combining the metadata hashes of all items in the directory, and use that as the directory symlink's metadata hash. -- MOS_MIGRATED_REVID=109564943
* RecursiveFilesystemTraversalFunction: introduce ResolvedFileFactoryForTesting.Gravatar Laszlo Csomor2015-12-07
| | | | | | | | Using this class it's easier to create ResolvedFile instances for tests that don't care about metadata eqality. -- MOS_MIGRATED_REVID=109562578
* Refactor ResolvedFile implementors: remove unnecessary Optional<> wrappers.Gravatar Laszlo Csomor2015-12-07
| | | | | | | Also remove unnecessary `type` members; they are constant. -- MOS_MIGRATED_REVID=109560348
* Refactoring: get rid of RecursiveFilesystemTraversalValue.ResolvedFileUtilsGravatar Laszlo Csomor2015-12-04
| | | | | -- MOS_MIGRATED_REVID=109420721
* Refactoring: RecursiveFilesystemTraversalValue.ResolvedFile is now an interface.Gravatar Laszlo Csomor2015-12-04
| | | | | | | | | | | | | | This CL changes the class structure, moving from inheritance to implementation and composition. In particular, it turns the abstract base class ResolvedFile into an interface which the earlier subclasses now simply implement rather than extending it. This change makes the code cleaner: implementors may write more complicated getters (and that's my plan to do in a subsequent CL) instead of just returning the members. -- MOS_MIGRATED_REVID=109405650
* Fix a bug in the Google-internal rule "Fileset" (not in Bazel).Gravatar Laszlo Csomor2015-12-02
| | | | | -- MOS_MIGRATED_REVID=109195426
* Support skylark aspects in serialization/deserialization.Gravatar Dmitry Lomov2015-11-30
| | | | | -- MOS_MIGRATED_REVID=108964575
* Enable load() statement in the WORKSPACE file.Gravatar Damien Martin-Guillerez2015-11-30
| | | | | | | | | | | RELNOTES[NEW]: Skylark macros are now enabled in WORKSPACE file. Design document at https://docs.google.com/document/d/1jKbNXOVp2T1zJD_iRnVr8k5D0xZKgO8blMVDlXOksJg/preview Fixes #337 -- MOS_MIGRATED_REVID=108860301
* Refactor Skylark rules and attributes in preparation to Skylark aspects.Gravatar Dmitry Lomov2015-11-26
| | | | | | | | | | | 1. attr.<type> functions return a wrapper object instead of Attribute.Builder dierctly. 2. RuleClass is created once per the life-time of RuleFunction, during export 3. Attributes are added to the RuleClass at exporting. -- MOS_MIGRATED_REVID=108774581
* Simplify external repository support by removing FileValue from ↵Gravatar Lukacs Berki2015-11-25
| | | | | | | RepositoryValue and not depending it from repository functions. -- MOS_MIGRATED_REVID=108685867
* Minor tweaks in DirectoryListingValueGravatar Michajlo Matijkiw2015-11-24
| | | | | -- MOS_MIGRATED_REVID=108532339
* Do not recurse into the convenience symlinks when evaluating the "//..." ↵Gravatar Lukacs Berki2015-11-20
| | | | | | | | | target pattern. Apart from the tests, I also tested this manually running "bazel query //..." in a tree with convenience symlinks. -- MOS_MIGRATED_REVID=108325454
* 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
* Allow SkyValues to be marked not "comparable". Such values are not compared ↵Gravatar Eric Fellheimer2015-11-19
| | | | | | | for the purpose of change pruning. -- MOS_MIGRATED_REVID=108203369