aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules/repository
Commit message (Collapse)AuthorAge
* Refactoring: makes the code simpler by deleting Metadata and InputArtifactData.Gravatar shahan2018-06-06
| | | | | | (minor) ActionFS now implements MetadataProvider.getInput PiperOrigin-RevId: 199575194
* Use the local JDK as the default target javabaseGravatar cushon2018-05-14
| | | | | | and continue to use the embedded JDK as the default host_javabase. PiperOrigin-RevId: 196471714
* Remove some unnecessary params.Gravatar nharmata2018-04-02
| | | | | RELNOTES: None PiperOrigin-RevId: 191354727
* Allow BazelPackageLoader to load external repositories.Gravatar carmi2018-03-13
| | | | | | | | | Also, disallow BazelPackageLoader from fetching missing external repos. Integration tests for BazelPackageLoader wrt external repos will be left for a follow-up CL. RELNOTES: None. PiperOrigin-RevId: 188967694
* Expose --output_user_base to the Bazel server processGravatar Klaus Aehlig2018-02-27
| | | | | | | | | | | ...so that it can use that path to compute other directories in the output user base, in particular the default location for caches. The first cache we will add is the hash-index cache for downloads of external archives, but a spawn cache might be added later in the output user base as well. Change-Id: I24b1c33235c8f76ec008ecb1789163de2b2a45be PiperOrigin-RevId: 187164275
* A couple quality-of-life improvements for Bazel devs, in response to an ↵Gravatar nharmata2018-02-23
| | | | | | | | | | email from philwo@. (i) Only have TimestampGranularityMonitor log the first file of relevance. This reduces log spam, especially in tests, while still maintaining useful information in the logs. (ii) Don't have ExternalFilesHelper log the fact that it encountered an external file when we're in a unit test or an integration test. Tests, especially bazel tests that use external repositories, tend to involve lots of "external" files. RELNOTES: None PiperOrigin-RevId: 186799176
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Remove mtime field from FileStateValue.Gravatar janakr2018-01-16
| | | | | | We stopped treating empty files specially in the execution phase after unknown commit. So this code is mostly if not entirely orphaned. The only scenario in which this would lead to a semantic difference that I can think of is if the user is running with --nouse_action_cache and a running Bazel server, and they have an action they want to re-run when an empty input file changes, which isn't something we need to be concerned about. PiperOrigin-RevId: 182109952
* Clean up Windows config_settingsGravatar Yun Peng2018-01-12
| | | | | | | | | | | | | | 1.Deleted config_setting for --cpu=x64_windows_msys, because we don't build Bazel with MSYS gcc anymore. 2.Deleted config_setting for --cpu=x64_windows_msvc, because it uses exactly the same toolchain as --cpu=x64_windows, it'll be removed in the future. This change reduces the complexity of our BUILD files and make them less confusing. Change-Id: I939831a6861413b0f745fb1be98aacd4fb780e0a PiperOrigin-RevId: 181751853
* Don't output duplicate srcs when jar and sourcejar are the sameGravatar Auke Schrijnen2018-01-02
| | | | | | | | | | When a source jar is used as maven_jar the filegroup in the generated BUILD.bazel contains duplicate entries. This results in an error when the jar is used as a dependency (... is duplicated in the 'srcs' attribute of rule 'file'). This change simply doesn't write the duplicate entry to the BUILD.bazel file when the filenames are equal. Closes #4333. PiperOrigin-RevId: 180534960
* Move bazel conditions into src/conditions.Gravatar tomlu2017-11-30
| | | | | | | This will enable an easier transition from checked-in BUILD files to ones generated by copybara. RELNOTES: None PiperOrigin-RevId: 177514519
* Update PathPackageLocator to take a list of potential build file names,Gravatar John Cater2017-11-28
| | | | | | | | | | | | | | instead of assuming BUILD. - Default the list to the same value as PackageLookupFunction: BUILD.bazel, BUILD. - Move BuildFileNames to the packages package, so it is more generally available. Part of #4056. Change-Id: Ie12512b492cd7d47a9e56ec3bc209f829feaf4b5 PiperOrigin-RevId: 177261295
* Propagate skylark flags to WORKSPACE and repo rulesGravatar brandjon2017-10-24
| | | | | RELNOTES: Skylark semantics flags now affect WORKSPACE files and repository rules. PiperOrigin-RevId: 173130286
* Allow NodeEntry implementations to keep just deps, as opposed to all edges ↵Gravatar janakr2017-10-10
| | | | | | or no edges. Also add option to disable checks in MemoizingEvaluatorTest that don't make sense for implementations that don't keep track of dirty nodes. Also extract RecordingDifferencer to an interface. And add a test for the situation that a node changes during a build that it's not requested, and which fails, necessitating cleanup. PiperOrigin-RevId: 171616817
* Remove PrecomputedValue for BlazeDirectories. All consumers have the value ↵Gravatar janakr2017-09-25
| | | | | | | | injected directly, which makes sense, because it's immutable over the lifetime of the server. Step 3. PiperOrigin-RevId: 169717587
* Inject BlazeDirectories into RepositoryDelegatorFunction directly, instead ↵Gravatar janakr2017-09-25
| | | | | | | | of depending on a precomputed value. BlazeDirectories don't change over the lifetime of the Blaze server, and certainly not over the lifetime of a SkyframeExecutor instance, which already had a reference to them. Step 2. PiperOrigin-RevId: 169711443
* CI,windows: create test_suites for Windows testsGravatar L?szl? Csomor2017-09-19
| | | | | | | | | | | | | | | Add recursive test_suite rules for all tests that ci.bazel.io runs for Windows, and set the top-level test_suite as the CI test target. Doing so shortens the command line and works around https://github.com/bazelbuild/bazel/issues/3742 I verified that the old set of tests are the same as the new set. Change-Id: Id8d5da3f0c03c9b8969a9f8e1e9a3096888365aa PiperOrigin-RevId: 169242858
* 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
* 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
* Pull maven -src jars when available alongside jars re:Gravatar juliexxia2017-08-24
| | | | | | | https://github.com/bazelbuild/bazel/issues/308 RELNOTES: None. PiperOrigin-RevId: 166219871
* Store content digests in repository marker files. ↵Gravatar Benjamin Peterson2017-08-24
| | | | | | | https://www.bazel.build/designs/2016/10/18/repository-invalidation.html Change-Id: I6cb01397a35cd32169a0e415f8d7f944e7d840df PiperOrigin-RevId: 166200841
* Migrate tests to Truth.Gravatar lberki2017-05-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 156979845
* PiperOrigin-RevId: 156331430Gravatar nharmata2017-05-19
|
* Automated g4 rollback of commit 9dec9a09d1e4d27e7cff73c440195a32d3b90752.Gravatar plf2017-05-05
| | | | PiperOrigin-RevId: 155194438
* Introduce BazelPackageLoader.Gravatar nharmata2017-05-04
| | | | | | | | | This is a standalone library for loading packages. It is intended to be used by clients outside of Bazel (for now, Kythe). Perform BazelPackageLoader#loadPackage in the testing hook used in all of Bazel's unit tests and integration tests. This gives us very good test coverage for BazelPackageLoader. RELNOTES: None PiperOrigin-RevId: 155004070
* 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
* Add check to LocalRepositoryFunction that the path contains a WORKSPACEGravatar John Cater2017-04-25
| | | | | | | | | | | file. Fixes #2841. RELNOTES: Every local_repository now requires a WORKSPACE file. Change-Id: I11d50b852796b8f919b1a61c8c9b59cb78c5b724 PiperOrigin-RevId: 154179215
* Add repository override optionGravatar kchodorow2017-04-20
| | | | | | | | | | | RELNOTES: Adds a --override_repository option that takes a repository name and path. This forces Bazel to use the directory at that path for the repository. Example usage: `--override_repository=foo=/home/user/gitroot/foo`. Fixes #1266 PiperOrigin-RevId: 153599291
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Make Bazel build with MSVC-default-toolchain Bazel Gravatar Yun Peng2017-03-08
| | | | | | | | | | | | | After this change, a msys bazel can be built with a MSVC-default Bazel by adding --cpu=x64_windows_msys --host=x64_windows_msys See https://github.com/bazelbuild/bazel/issues/2627 -- Change-Id: Iaa82bf4dd911c5740b98d3b2739dfccca6203f79 Reviewed-on: https://cr.bazel.build/9293 PiperOrigin-RevId: 149532274 MOS_MIGRATED_REVID=149532274
* Move UnixFileSystem to lib.unix, WindowsFileSystem to lib.windowsGravatar Ulf Adams2017-02-28
| | | | | | -- PiperOrigin-RevId: 148749485 MOS_MIGRATED_REVID=148749485
* Use //third_party/protobuf:protobuf_java instead of ↵Gravatar Carmi Grushko2017-02-09
| | | | | | | | | | //third_party/protobuf:protobuf to refer to the Java proto runtime. This is the name in the upstream protobuf repo. -- PiperOrigin-RevId: 146949832 MOS_MIGRATED_REVID=146949832
* Inject the digest of the marker file in the RepositoryDirectoryValue Gravatar Damien Martin-Guillerez2017-01-19
| | | | | | | | | | | This digest make sure that we produce a different RepositoryDirectoryValue for different marker data, thus invalidating the node. -- Change-Id: Ibc6286c76de7a8d07ece2bb8125bfb75095f7784 Reviewed-on: https://cr.bazel.build/8136 PiperOrigin-RevId: 144948233 MOS_MIGRATED_REVID=144948233
* Remote repositories: add the infrastructure for extending the marker file Gravatar Damien Martin-Guillerez2017-01-17
| | | | | | | | | | | | | | | This add a markerData map to the RepositoryFunction#fetch function so RepositoryFunction-s can declare extraneous data to add to the marker file. The RepositoryFunction#verifyMarkerData is called to verify those data in order to know if the repository is up to date and need re-fetching. Design doc: https://bazel.build/designs/2016/10/18/repository-invalidation.html [step 2] -- Change-Id: I9083fb72a0142f418a7296f889cd3eaf32e92498 Reviewed-on: https://cr.bazel.build/7973 PiperOrigin-RevId: 144728497 MOS_MIGRATED_REVID=144728497
* Revert "Revert "Fix repositories to use 'BUILD.bazel' as the name for the ↵Gravatar John Cater2016-12-21
| | | | | | | | | | | | symlinked/new build file, which has less changes of causing conflicts. Fixes #2226."" This reverts commit fa3f55a8785c28253b2f836ddc84e994e48edd7f. -- Change-Id: Ife393ebf4966cfaf2a487c80c67a781ca7ee69b0 Reviewed-on: https://cr.bazel.build/8051 PiperOrigin-RevId: 142555911 MOS_MIGRATED_REVID=142555911
* Revert "Fix repositories to use 'BUILD.bazel' as the name for the ↵Gravatar John Cater2016-12-16
| | | | | | | | | | | | | symlinked/new build file, which has less changes of causing conflicts. Fixes #2226." This reverts commit 2f31d60d1454cd324196a5159262c1ba32eabda8. Re-open #2226. -- Change-Id: I7f223df4bb239daf8c306955e92f817310e6cd4f Reviewed-on: https://cr.bazel.build/7950 PiperOrigin-RevId: 142257579 MOS_MIGRATED_REVID=142257579
* Fix repositories to use 'BUILD.bazel' as the name for the symlinked/new ↵Gravatar John Cater2016-12-13
| | | | | | | | | | build file, which has less changes of causing conflicts. Fixes #2226. -- Change-Id: I4a378d693004d4d6857c78d7ffe886ada3fb9239 Reviewed-on: https://cr.bazel.build/7850 PiperOrigin-RevId: 141909918 MOS_MIGRATED_REVID=141909918
* Windows, native: add windows_msvc config_settingGravatar Laszlo Csomor2016-09-28
| | | | | | | | | | | | | | | Update `select` statements in BUILD files with the new config_setting. This is a first step on a long path that leads to us being able to compile bazel on Windows with --cpu=x64_windows_msvc. Needless to say, we're not there yet. Tested: on Linux, Darwin, Windows/MSYS -- MOS_MIGRATED_REVID=134534613
* Fixed symbolic link and hard link path not stripped when "strip_prefix" is set.Gravatar Xin Gao2016-09-23
| | | | | -- MOS_MIGRATED_REVID=134005484
* Rollback of commit 4e2f75d8e60020f13a7df452488ec4cc7a719f03.Gravatar Kristina Chodorow2016-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** This is causing external_integration_test to fail See, for example, http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/236/console: ** test_http_archive_tar_xz **************************************************** GET /fox.tar.xz HTTP/1.1 User-Agent: Java/1.8.0_101 Host: localhost:36541 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive cat: bazel-out/../external/endangered/fox/male_absolute: No such file or directory -- Test log: ----------------------------------------------------------- INFO: Reading 'startup' options from /home/ci/.cache/bazel/_bazel_ci/a761298a0949227106f79c62c3bebb6e/bazel-sandbox/81f51af6-eb50-417e-8f8d-b7bba207ee83-661/execroot/linux-x86_64/_tmp/external_integration_test_2/bazelrc: --output_user_root=/home/ci/.cache/bazel/_bazel_ci/a761298a0949227106f79c62c3bebb6e/bazel-sandbox/81f51af6-eb50-417e-8f8d-b7bba207ee83-661/execroot/linux-x86_64/_tmp/external_integration_test_2/root --host_javabase=/home/ci/.cache/bazel/_bazel_ci/a761298a0949227106f79c62c3bebb6e/bazel-sandbox/81f51af6-eb50-417e-8f8d-b7bba207ee83-661/execroot/linux-x86_64/bazel-out/local-fastbuild/bin/src/test/shell/bazel/external_integration_test.runfiles/local_jdk INFO: $TEST_TMPDIR defined: output root default is '/home/ci/.cache/bazel/_bazel_ci/a761298a0949227106f79c62c3bebb6e/bazel-sandbox/81f51af6-eb50-417e-8f8d-b7bba207ee83-661/execroot/linux-x86_64/_tmp/external_integration_test_2'. .............................................. ____Loading package: zoo ____Loading... ____Loading package: @bazel_tools//tools/cpp ____Loading package: @bazel_tools//tools/jdk ____Loading package: @local_config_xcode// ____Loading package: @local_jdk// ____Loading package: @local_config_cc// ____Loading complete. Analyzing... ____Downloading from [] 0B ____Downloading from [] 1KB ____Loading package: @endangered//fox ____Found 1 target... ____Building... ____[0 / 1] BazelWorkspaceStatusAction stable-status.txt ____[0 / 4] Creating source manifest for //zoo:breeding-program ____[0 / 4] Symlinking //zoo:breeding-program ____[3 / 4] Creating runfiles tree bazel-out/local-fastbuild/bin/zoo/breeding-program.runfiles ____Building complete. Target //zoo:breeding-program up-to-date: bazel-bin/zoo/breeding-program ____Elapsed time: 6.903s, Critical Path: 0.04s ____Running command line: bazel-bin/zoo/breeding-program Fraka-kaka-kaka-kaka-kow ------------------------------------------------------------------------ test_http_archive_tar_xz FAILED: Expected regexp #!/bin/bash echo Fraka-kaka-kaka-kaka-kow not found in bazel-out/../external/endangered/fox/male_absolute . /home/ci/.cache/bazel/_bazel_ci/a761298a0949227106f79c62c3bebb6e/bazel-sandbox/81f51af6-eb50-417e-8f8d-b7bba207ee83-661/execroot/linux-x86_64/bazel-out/local-fastbuild/bin/src/test/shell/bazel/external_integration_test.runfiles/io_bazel/src/test/shell/bazel/external_integration_test:154: in call to assert_files_same /home/ci/.cache/bazel/_bazel_ci/a761298a0949227106f79c62c3bebb6e/bazel-sandbox/81f51af6-eb50-417e-8f8d-b7bba207ee83-661/execroot/linux-x86_64/bazel-out/local-fastbuild/bin/src/test/shell/bazel/external_integration_test.runfiles/io_bazel/src/test/shell/bazel/external_integration_test:150: in call to http_archive_helper /home/ci/.cache/bazel/_bazel_ci/a761298a0949227106f79c62c3bebb6e/bazel-sandbox/81f51af6-eb50-417e-8f8d-b7bba207ee83-661/execroot/linux-x86_64/bazel-out/local-fastbuild/bin/src/test/shell/bazel/external_integration_test.runfiles/io_bazel/src/test/shell/bazel/external_integration_test:190: in call to test_http_archive_tar_xz FAILED: test_http_archive_tar_xz *** Original change description *** Fixed symbolic link and hard link path not stripped when "strip_prefix" is set. -- MOS_MIGRATED_REVID=133970692
* Fixed symbolic link and hard link path not stripped when "strip_prefix" is set.Gravatar Xin Gao2016-09-20
| | | | | -- MOS_MIGRATED_REVID=133628392
* Exclude CompressedTarFunctionTest on WindowsGravatar Yun Peng2016-09-09
| | | | | | | Since on Windows, we don't have previlige to create symbolic links. -- MOS_MIGRATED_REVID=132551521
* Fixed the issue that hard links are handled improperly when bazel ↵Gravatar Googler2016-09-08
| | | | | | | | | decompresses tarballs. Issue link: https://github.com/bazelbuild/bazel/issues/574 -- MOS_MIGRATED_REVID=132434278
* Move cmdline lib to its own packageGravatar Kristina Chodorow2016-07-21
| | | | | -- MOS_MIGRATED_REVID=128097235
* Add all the sources to //:srcs filegroup and add a check to detectGravatar Damien Martin-Guillerez2016-07-01
| | | | | | | | | | | missing file to it. We need to activate this check on presubmits -- Change-Id: Ia95e92d3816ce92bb69bc0e2cf56e9c60b68d970 Reviewed-on: https://bazel-review.googlesource.com/#/c/3949/ MOS_MIGRATED_REVID=126404792
* Replace Constants.PRODUCT_NAME with a startup option --product_name=bazel and Gravatar Luis Fernando Pino Duque2016-05-31
| | | | | | | | | | | (finally) delete Constants.java. For bazel the file Constants.java is the only source of src/main/java/com/google/devtools/build/lib:common and since it was exporting guava then many dependencies needed to be fixed. -- MOS_MIGRATED_REVID=123648270
* Add an "alias" rule.Gravatar Lukacs Berki2016-05-10
| | | | | | | This will be used to replace RedirectChaser so that we don't need to load packages during configuration creation anymore. -- MOS_MIGRATED_REVID=121935989
* Add a //file target to external jar repositoriesGravatar Colin Marc2016-05-03
| | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/990. It's sometimes useful to be able to access the file pulled down with maven_jar; for example, scala macro jars don't work with ijar, so it's necessary to pull them into the compile-time classpath unharmed. -- Change-Id: I1d9e1cb30ea6fa56c18cbfcc68ee9b203524dfd4 Reviewed-on: https://bazel-review.googlesource.com/#/c/3550 MOS_MIGRATED_REVID=121379551
* Set workspace name for http_file, http_jar, and maven_jarGravatar Kristina Chodorow2016-05-03
| | | | | | | | | | | | | | | | Fixes #1166. While I was here, I also: * Renamed the implementations of Decompressor to show that they are Decompressors, not SkyFunctions (they used to be, it's confusing to have them still have the -Function suffix). * Added a unit test and moved the testing target to the rule/repository subdirectory, since it was a good chance to break off a tiny chunk of the monolithic BUILD file in lib/. -- MOS_MIGRATED_REVID=121306165
* Remove the directories field from RepositoryFunction.Gravatar Ulf Adams2016-03-31
| | | | | | | | This is problematic for coming up with a less stateful BlazeModule API, which - in turn - is a requirement for running multiple commands in the same server. -- MOS_MIGRATED_REVID=118696892