You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
runfiles: provide language-specific runfiles libraries #4460
Feature requests: what underlying problem are you trying to solve with this feature?
FR: provide language-specific runfiles libraries, with implementations of platform-independent rlocation, for the main languages: Bash, Java, C++, Python.
Motivation:
easier for users: they don't need to worry about runfiles semantics, just include a library and use runfiles the same way on every platform
easier for Bazel developers: we can change runfiles semantics if we need to, and only need to change the libraries and release Bazel for people to get the new semantics
Done -- Bazel 0.15.0 contains the runfiles library for Python, Bash, C++, and Java, and they all support rlocation(). None of them supports rfind() yet (see #4334).
FYI, on my Windows machine the grep and cut dependencies in the runfiles.bash initializer block don't work. In cmd.exe and cmder.exe I get a version mismatch on a cygwin1.dll, in PowerShell grep and cut aren't found.
Does this feature require new installation instructions on Windows?
After discussion we decided not to use login shell (-l), because it will not only override the original PATH env var, but also do other things we don't need (eg. changing current directory, run shell configuration files)
Instead we will add the bash bin directory to PATH to make the bin tools available.
Activity
laszlocsomor commentedon Jan 15, 2018
related: #3839
java,runfiles: cut all third-party dependencies
java,runfiles: runfiles library in @bazel_tools
python,runfiles: runfiles library in @bazel_tools
runfiles,py: add test to run a data-dependency
runfiles test: extract mock Java code to a file
python,runfiles library: don't pick up TEST_SRCDIR
python,runfiles library,refactor: rename EnvVar()
Java,runfiles,test: test finding runfiles
windows,launcher: now picks up RUNFILES_* envvars
runfiles library: py_binary can run java_binary
67 remaining items
Add a library for looking up runfiles.
Add a library for looking up runfiles.
Add a library for looking up runfiles.
Add a library for looking up runfiles. (#302)
runfiles libraries: fix tests and comments
runfiles libraries: fix tests and comments
laszlocsomor commentedon Jul 3, 2018
Done -- Bazel 0.15.0 contains the runfiles library for Python, Bash, C++, and Java, and they all support
rlocation(). None of them supportsrfind()yet (see #4334).alexeagle commentedon Jul 10, 2018
FYI, on my Windows machine the
grepandcutdependencies in the runfiles.bash initializer block don't work. In cmd.exe and cmder.exe I get a version mismatch on a cygwin1.dll, in PowerShell grep and cut aren't found.Does this feature require new installation instructions on Windows?
laszlocsomor commentedon Jul 10, 2018
Thanks for reporting that! How do you run the binary -- directly from bazel-bin, using "bazel run", or as part of another rule (e.g. genrule)?
laszlocsomor commentedon Jul 10, 2018
Meanwhile I ran into the same problem. @meteorcloudy knows how to fix it -- we just need to use
bash -lin the sh_binary's launcher.meteorcloudy commentedon Jul 11, 2018
After discussion we decided not to use login shell (
-l), because it will not only override the original PATH env var, but also do other things we don't need (eg. changing current directory, run shell configuration files)Instead we will add the bash bin directory to PATH to make the bin tools available.
alexeagle commentedon Jul 12, 2018
alexeagle commentedon Jul 31, 2018
Opened a separate issue since this is still broken in Bazel 0.16
runfiles libraries: fix tests and comments