| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the half-done C++ runfiles library to
`//tools/cpp/runfiles`. (The Python and
Bash runfiles libraries are already under
`//tools/<language>/runfiles`.)
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I1006f7f81462ea0e4b1de1adcdba89e386d4f9e7
Closes #5107.
Change-Id: I1006f7f81462ea0e4b1de1adcdba89e386d4f9e7
PiperOrigin-RevId: 194763392
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit prepares simplifying the Java runfiles
library, which itself prepares mergint the
manifest-based and directory-based logic so that
the Runfiles class could handle both at the same
time.
This commit only moves classes around:
- moves the ManifestBased and DirectoryBased
classes into Runfiles, as nested classes
- adds a createManifestBasedForTesting and
createDirectoryBasedForTesting method to create
the classes for testing
- moves the ManifestBasedTest and
DirectoryBasedTest into RunfilesTest
Otherwise this commit has no functional change.
Change-Id: I56b582c1a95793b0a871748697673b53a780f0fb
PiperOrigin-RevId: 194227675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rlocation() now validates that the path argument
is normalized, i.e. contains none of:
- current directory references (".")
- uplevel references ("..")
- double slash ("//")
This helps avoiding a bug similar to https://github.com/bazelbuild/bazel/pull/5083.
See https://github.com/bazelbuild/bazel/pull/4460
Change-Id: Ia73fa2df1eae86fc7084162c24e144129672742d
Closes #5085.
Change-Id: Ia73fa2df1eae86fc7084162c24e144129672742d
PiperOrigin-RevId: 194074072
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new method lets Java programs export the
RUNFILES_* environment variables for subprocesses,
in case those subprocesses are other Bazel-built
binaries that also need runfiles.
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I05c0b84db357128bc15f21a167a0d92e8d17599c
Closes #5016.
Change-Id: I66ca5c44067a7353b8de180a64f20c8352e3c9ec
PiperOrigin-RevId: 193013289
|
|
|
|
|
|
|
|
|
|
|
|
| |
I need to rewrite the Bash runfiles library and
move it to //tools/bash/runfiles.
See https://github.com/bazelbuild/bazel/issues/4460
Closes #5012.
Change-Id: I422f04735dc05a0c4a7e80e1dd276d61583b5e88
PiperOrigin-RevId: 192754869
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the Python runfiles library from
`@bazel_tools//tools/runfiles:py-runfiles` to
`@bazel_tools//tools/python/runfiles:runfiles`
Also rename the testdata runfiles.py to foo.py.
This file was not a mock runfiles library, just a
client file using the runfiles library that was
also called runfiles.py
Fixes https://github.com/bazelbuild/bazel/issues/4878
Change-Id: I874b230c93679d4454ac91e816932c8272ecc5c7
Closes #4981.
Change-Id: I908e0ab7ec61225e82f70793b1a05432e7f0b07e
PiperOrigin-RevId: 192256481
|
|
|
|
|
|
|
| |
third_party/gtest can go away after this.
RELNOTES: None.
PiperOrigin-RevId: 190221581
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
breaks building //src:bazel
*** Original change description ***
runfiles,C++: move to //tools/cpp/runfiles
Move the C++ runfiles library to the location of
the rest of the C++ tools.
Also change the C++ namespace to reflect the
directory hierarchy.
We have not yet announced nor released the C++
runfiles library so these refactorings are fine.
See https://github.com/bazelbuild/bazel/issues/4460
Closes #4873.
PiperOrigin-RevId: 189883066
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the C++ runfiles library to the location of
the rest of the C++ tools.
Also change the C++ namespace to reflect the
directory hierarchy.
We have not yet announced nor released the C++
runfiles library so these refactorings are fine.
See https://github.com/bazelbuild/bazel/issues/4460
Closes #4873.
Change-Id: I1732ef1eaff880cae05b7d218a3b1c0461a6b029
PiperOrigin-RevId: 189874201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement Runfiles::Create method, which inspects
the RUNFILES_* envvars as well as the availability
of a runfiles manifest or -directory near argv[0],
and creates a Runfiles* object based on that.
Also add documentation and usage examples.
Subsequent commit will add integration tests.
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I2aa433d460826999e698597205ae7663b0e84dd3
PiperOrigin-RevId: 189555342
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rlocation functions in the Python and Java
runfiles libraries (under
@bazel_tools//tools/runfiles) now consistently
return the argument itself if it is an absolute
path.
If the argument is a driveless absolute Windows
path (e.g. "\\windows\\system32") then rlocation
reports an error.
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I80474f7cc4736a571bf113438a916f71c36a344d
Closes #4806.
Change-Id: I80474f7cc4736a571bf113438a916f71c36a344d
PiperOrigin-RevId: 188453982
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement Runfiles::EnvVars so it's now possible
to propagate runfiles to subprocesses via
environment variables (RUNFILES_MANIFEST_FILE and
RUNFILES_DIR).
Subsequent commits will add more feataures:
- automatic Runfiles creation based on argv[0] and
the envvars of this process
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: If9a37b1be13b9cbacf21a496305d60444fd660b2
PiperOrigin-RevId: 187858830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a manifest-based Runfiles object, add
tests and test utils (MockFile).
Subsequent commits will add more feataures:
- creating list of envvars to pass to child
processes
- automatic Runfiles creation based on argv[0] and
the envvars of this process
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I4376ede3ac00241688ff16a36ed596fb08f13a72
PiperOrigin-RevId: 187318502
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the foundation of the C++ runfiles
library, along with a directory-based Runfiles
implementation.
Subsequent commits will add more feataures:
- manifest-based runfiles handling
- creating list of envvars to pass to child
processes
- automatic Runfiles creation based on argv[0] and
the envvars of this process
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: Id5a38619a1ae874499f04523863081559360410c
PiperOrigin-RevId: 187031518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add "JAVA_RUNFILES" (and "RUNFILES_DIR") to the
dict that Runfiles.EnvVars() returns in the Python
runfiles library, so Python programs that use the
Python runfiles library in @bazel_tools can now
run java_binary data-dependencies as subprocesses
and the latter will find the runfiles.
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I0566f6d3c68631a1d99e67964fbe8019ee82324b
PiperOrigin-RevId: 185812948
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename the runfiles library's Runfiles.EnvVar()
method to EnvVars(), indicating that it may return
multiple entries in the dict.
In the future this method will return multiple
keys, but I want to update the interface ASAP so
that it is stable after it's released in Bazel
0.12.0.
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I8ab3a2a64736ff746dd96fea80ba2f5356dcfcc3
PiperOrigin-RevId: 185118832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Python runfiles library will no longer pick up
the runfiles directory from $TEST_SRCDIR.
This is in accordance with the Java runfiles
library, see the motivation in
https://github.com/bazelbuild/bazel/issues/4598
The commit also adds a test for this functionality
as well as exercising that the runfiles library
can find the runfiles directory even if no
RUNFILES_* envvars are exported.
See https://github.com/bazelbuild/bazel/issues/4598
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I6e4d154cdca66b29d7c6e77743cf8109638238b5
PiperOrigin-RevId: 185009819
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bazel 0.11.0 releases a new Java runfiles library
in @bazel_tools. This commit fixes some bugs in
0.11.0rc1:
- The library no longer respects TEST_SRCDIR, so
now it's possible to run Bazel inside of a test
and build and run a mock java_binary, and that
java_binary will *not* pick up the test's
TEST_SRCDIR.
- The library now allows calling rlocation for
absolute paths, and just returns the path
itself. This is in accordance with how our Bash
rlocation() implementation works.
Change-Id: I471247d7538a76ea8162d2192add3f9733f844a8
PiperOrigin-RevId: 184990272
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also update the Python stub script template to set
$RUNFILES_MANIFEST_FILE or $RUNFILES_DIR so the
runfiles library only needs to look for those.
See https://github.com/bazelbuild/bazel/issues/4460
RELNOTES[NEW]: python,runfiles: You can now depend on `@bazel_tools//tools/runfiles:py-runfiles` to get a platform-independent runfiles library for Python. See DocString of https://github.com/bazelbuild/bazel/blob/master/src/tools/runfiles/runfiles.py for usage information.
Change-Id: I4f68a11cb59f2782e5203e39fe60cc66b46023a2
PiperOrigin-RevId: 184515490
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also make most targets in `//src/tools/runfiles`
private. The user should depend on
`@bazel_tools//tools/runfiles:$LANG-runfiles`
instead.
See https://github.com/bazelbuild/bazel/issues/4460
RELNOTES[NEW]: java,runfiles: You can now depend on `@bazel_tools//tools/runfiles:java-runfiles` to get a platform-independent runfiles library for Java. See JavaDoc of https://github.com/bazelbuild/bazel/blob/master/src/tools/runfiles/java/com/google/devtools/build/runfiles/Runfiles.java for usage information.
Change-Id: Iba9113453222ae74ce42a324272711f613104891
PiperOrigin-RevId: 182022851
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cut all dependencies of the Java runfiles library,
so we can include its sources in @bazel_tools, and
any Java project can safely depend on it without
worrying about pulling in an incompatible version
of Guava for example.
See https://github.com/bazelbuild/bazel/issues/4460
Change-Id: I4a9314c56a2c9dc3afdf53669429750d8fb81e3b
PiperOrigin-RevId: 181968558
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a prerequisite to port all tests to run on
Windows. It is also part of the effort to provide
platform-independent, language-specific
runfiles-handling libraries.
See:
- https://github.com/bazelbuild/bazel/issues/4292
- https://github.com/bazelbuild/bazel/issues/3839
Change-Id: Ic64aadcf3f97885de3151da9f921d6351687dce9
PiperOrigin-RevId: 181727511
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Argument mixes string and array. Use * or separate argument.
- Quote the grep pattern so the shell won't interpret it.
- Use "${var:?}" to ensure this never expands to /* .
- > is for string comparisons. Use -gt instead.
- Quote the parameter to -name so the shell won't interpret it.
Closes #4163.
PiperOrigin-RevId: 179042046
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 178099410
|
|
|
|
|
|
|
| |
This will enable an easier transition from checked-in BUILD files to ones generated by copybara.
RELNOTES: None
PiperOrigin-RevId: 177514519
|
|
Create sourceable runfiles.sh that implements
rlocation and a couple other helper functions for
shell scripts.
Change-Id: Ifcf9ee86ed63afe2ce655be596ac781494660398
RELNOTES[NEW]: runfiles, sh: Shell scripts may now depend on //src/tools/runfiles:runfiles_sh_lib and source runfiles.sh. The script defines the `rlocation` function which returns runfile paths on every platform.
PiperOrigin-RevId: 171816037
|