Skip to content

runfiles: provide language-specific runfiles libraries #4460

Closed

Description

@laszlocsomor

Update(2018/04/17): link to design doc.

Blockers

Blocking:

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

Activity

  1. self-assigned this
    on Jan 15, 2018
  2. added
    P1
    on Jan 15, 2018
  3. laszlocsomor commented on Jan 15, 2018

    @laszlocsomor
    ContributorAuthor

    related: #3839

  4. 67 remaining items

  5. laszlocsomor commented on Jul 3, 2018

    @laszlocsomor
    ContributorAuthor

    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).

  6. alexeagle commented on Jul 10, 2018

    @alexeagle
    Contributor

    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?

  7. laszlocsomor commented on Jul 10, 2018

    @laszlocsomor
    ContributorAuthor

    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)?

  8. laszlocsomor commented on Jul 10, 2018

    @laszlocsomor
    ContributorAuthor

    Meanwhile I ran into the same problem. @meteorcloudy knows how to fix it -- we just need to use bash -l in the sh_binary's launcher.

  9. meteorcloudy commented on Jul 11, 2018

    @meteorcloudy
    Member

    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.

  10. alexeagle commented on Jul 12, 2018

    @alexeagle
    Contributor
  11. alexeagle commented on Jul 31, 2018

    @alexeagle
    Contributor

    Opened a separate issue since this is still broken in Bazel 0.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1type: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions