aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/repository
Commit message (Collapse)AuthorAge
...
* Make local_repository and new_local_repository work with the limitations of ↵Gravatar Lukacs Berki2016-01-26
| | | | | | | our plans for symlink support on Windows. -- MOS_MIGRATED_REVID=113043269
* 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
* Remove unused ${ATTRIBUTE_DEFINITION} and ${ATTRIBUTE_SIGNATURE} variables fromGravatar David Chen2016-01-25
| | | | | | | | | Bazel native rule inline documentation. These variables are no longer used because the docgen templates now directly generate the table of attributes instead of using ATTRIBUTE_DEFINITION and call RuleDocumentation.getAttributeSignature() instead of using ATTRIBUTE_SIGNATURE. RuleDocumentation.getHtmlDocumentation() currently resolves both of these variables to the empty string. -- MOS_MIGRATED_REVID=112933659
* Always generate a workspace name for new repositoriesGravatar Kristina Chodorow2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112790992
* Fix potential NullPointerException in RepositoryFunctionGravatar Damien Martin-Guillerez2016-01-20
| | | | | -- MOS_MIGRATED_REVID=112555666
* Inlined RepositoryFunction#getExternalPackageGravatar Damien Martin-Guillerez2016-01-18
| | | | | | | | | | This method was used only twice. Now there is only one entry point for requesting a rule in the external package (RepositoryFunction#getRule(String, Environment)). This is a step towards supporting loading skylark rules in the workspace file from remote repository. -- MOS_MIGRATED_REVID=112407797
* Allow relative paths for local_repository()sGravatar Kristina Chodorow2016-01-07
| | | | | | | | | | Fixes #733. RELNOTES: Relative paths can now be used for 'path' with new_local_repository and local_repository. -- MOS_MIGRATED_REVID=111620894
* Don't attempt to get a fingerprint if there are missing skyframe valuesGravatar Kristina Chodorow2015-12-30
| | | | | | | Fixes #742. -- MOS_MIGRATED_REVID=111043129
* Simplify the contract of RepositoryFunction to "I am given a Rule and a ↵Gravatar Lukacs Berki2015-12-14
| | | | | | | | | | | | | | | | | | | | | | | directory that I should populate". The directory itself is not created because local_repository actually puts a symlink in its place. As a side effect, make HTTP downloading, git cloning and archive decompressing not be SkyFunctions. This is necessary because it needs to be the RepositoryFunction and not a dependent SkyFunction that populates the output directory, because it that's the case what happens is: 1. RepositoryDelegatorFunction cleans up the directory and prepares it for RepositoryFunction 2. RepositoryFunction calls env.getValue(<function that populates the directory>) 3. That value hasn't been computed yet, thus RepositoryDelegatorFunction returns early 4. The function that populates the directory is called 5. RepositoryDelegatorFunction is restarted 6. RepositoryDelegatorFunction cleans up the directory 7. RepositoryFunction calls env.getValue(), and nothing is done because the value has already been computed 8. RepositoryDelegatorFunction proudly returns, even though the directory is actually empty Another way to solve this problem would be to make RepositoryFunction not clean the directory up on Skyframe restarts, but that means that we'd need to keep state somewhere, which doesn't strike me as a particularly great idea because let's keep state outside of Skyframe only when absolutely necessary (e.g. the marker files for cross-server instance persistence of downloaded repositories). That "somewhere" could either be a member variable of RepositoryDelegatorFunction or the file system. Note that this change causes external communication to be re-done in a few more cases than before (see that changes to the test cases), but I'd rather we be correct and simple than fast. We can optimize things later if needed and there is enough complexity going around, thank you very much. -- MOS_MIGRATED_REVID=110134397
* 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
* Simplify rule fingerprinting in RepositoryFunctionGravatar Michajlo Matijkiw2015-11-30
| | | | | -- MOS_MIGRATED_REVID=108986856
* 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
* Make external repository implementations not re-fetch things on server restart.Gravatar Lukacs Berki2015-11-25
| | | | | | | | | This is accomplished by saving a proto of the repository rule in the output tree, then comparing it to that of the previous version. This makes HTTP_DOWNLOAD_CHECKER somewhat superfluous because it only matters if the external repository directory is modified manually. Local repository implementations are not included, mainly because the symlinking is cheap (maybe they should be for reasons of symmetry?) -- MOS_MIGRATED_REVID=108706396
* 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
* Rollback of commit f6866778db261e5d8b95ee1c46622ceb19a609a4.Gravatar Lukacs Berki2015-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks the Jenkins continuous builds. The error message is a mysterious Skyframe one and it only raised if the Android NDK/SDK is set in the WORKSPACE file: java.lang.IllegalStateException: ANDROID_NDK_REPOSITORY:@androidndk -> GroupedListHelper{groupedList=[FILE:[/usr/local/google/home/lberki/.cache/bazel/_bazel_lberki/97aa07230f44a76bcaa14338f20a8e2e/external/androidndk/ndk/RELEASE.TXT]/[]], elements=[FILE:...], size=24}, reverseDepsToSignal=ReverseDeps{reverseDeps=REPOSITORY:@androidndk, singleReverseDep=true, dataToConsolidate=null}, lastBuildDirectDeps=null, dirtyDirectDepIterator=null}} at com.google.common.base.Preconditions.checkState(Preconditions.java:197) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:994) at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$2.run(AbstractQueueVisitor.java:496) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) *** Original change description *** Preserve repositories' rooted paths This was taking the "right" rooted path, converting it to a path, and then making the rooted path [/path/to/external/repo/BUILD]/[] (where it should have been [/path/to/external/repo]/[BUILD]). -- MOS_MIGRATED_REVID=107768560
* Preserve repositories' rooted pathsGravatar Kristina Chodorow2015-11-13
| | | | | | | | | This was taking the "right" rooted path, converting it to a path, and then making the rooted path [/path/to/external/repo/BUILD]/[] (where it should have been [/path/to/external/repo]/[BUILD]). -- MOS_MIGRATED_REVID=107726114
* Move local_repository and new_local_repository from build.lib.bazel to ↵Gravatar Lukacs Berki2015-10-30
build.lib. -- MOS_MIGRATED_REVID=106689603