aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/RepositoryValue.java
Commit message (Collapse)AuthorAge
* Replace LegacySkyKey by AbstractSkyKey or custom SkyKeys. AbstractSkyKey ↵Gravatar janakr2018-03-02
| | | | | | | | doesn't save memory in the 32-bit case, but makes it easier for people to see how many SkyKeys we have. There's some unnecessary interning in tests, but it was easier to copypasta and doesn't harm anything, I think. PiperOrigin-RevId: 187694309
* Make SkyKey an interface, and start the migration of not creating SkyKey ↵Gravatar janakr2017-05-04
| | | | | | wrapper objects: for OwnedArtifacts, which are the most numerous during builds, and for Labels for TransitiveTraversalValues, which are the most numerous during queries. PiperOrigin-RevId: 154989520
* Rewrite repository lookup to return a failed value rather than throwGravatar ulfjack2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | We need to lookup repositories as part of converting exec paths to artifacts, which in turn is needed for action cache lookups. These lookups should not cause a Skyframe exit, so we must not throw an exception here, unless the error makes it impossible to continue. Instead, we need to leave the decision whether to error out or not to the caller. Note that we may unnecessarily fetch a remote repository in order to do the action cache lookup, even if the action no longer depends on the input file, although this should only be possible for C++ compile actions. It's possible that there's another bug in the C++ compile action key computation that also contributes. This change also makes it so that the post-resolution action cache code ignores any errors wrt. repository lookup rather than throwing. If any of the paths could not be found, then the action cache lookup fails and we re-execute the corresponding action, which is exactly what should happen. Fixes #2759. PiperOrigin-RevId: 153696243
* 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
* Use static creation method for SkyKey. This allows interning SkyKeys as they ↵Gravatar Janak Ramakrishnan2016-03-03
| | | | | | | are created, as opposed to when they are requested from the ParallelEvaluator. That delay can lead to large memory spikes and churn. -- MOS_MIGRATED_REVID=116224565
* Parse the workspace name when a repository is loadedGravatar Kristina Chodorow2016-01-29
| | | | | | | | | Moved RepositoryValue to RepositoryDirectoryValue so that it could be cached (and not re-downloaded) even if the WorkspaceAST caused a Skyframe restart (as mentioned in https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java#L130-L133). -- MOS_MIGRATED_REVID=113358489
* Move RepositoryName to its own top-level classGravatar Kristina Chodorow2016-01-26
| | | | | | | | | | As it's about to get more important in its own right. The only change that isn't just moving code around is making RepositoryName.validate package-private. -- MOS_MIGRATED_REVID=112956571
* 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
* 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
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Move PackageIdentifier to cmdlineGravatar Kristina Chodorow2015-08-31
| | | | | | | | This is necessary to have TargetResolver depend on it without making it depend on the packages target. First step of #389. -- MOS_MIGRATED_REVID=101790345
* Track BUILD file changes on new_ repositoriesGravatar Kristina Chodorow2015-05-07
| | | | | | | | I noticed, while writing http://bazel.io/docs/cpp.html#including-external-libraries-an-example, that the BUILD file didn't get reparsed when it changed. This fixes that. -- MOS_MIGRATED_REVID=92921670
* Add on-the-fly remote reposGravatar Kristina Chodorow2015-03-20
| | | | | | | | | | | | | | | | | Adds a new rule: new_http_archive( name = "whatever", url = "http://www.github.com/google/bazel-tools/my-tools.zip", sha256 = "...", build_file = "my/tools/objc.BUILD", ) This will download & unzip my-tools.zip, put a WORKSPACE file in its root, and link the provided BUILD file into its root. -- MOS_MIGRATED_REVID=88941267
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957