Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent runfile paths across repositories #1090

Closed
jart opened this issue Mar 25, 2016 · 3 comments
Closed

Consistent runfile paths across repositories #1090

jart opened this issue Mar 25, 2016 · 3 comments
Assignees

Comments

@jart
Copy link
Contributor

jart commented Mar 25, 2016

I've written a shell script for the Closure Rules that references runfiles specified in data as follows:

if [[ "${RUNFILES}" == "" ]]; then
  if [[ "$(basename "$(pwd)")" =~ \.runfiles$ ]]; then
    RUNFILES="$(pwd)"
  else
    RUNFILES="${0}.runfiles"
  fi
fi

"${RUNFILES}/third_party/phantomjs/bin/phantomjs" "$@"

The problem is that, when my repository is included by another one, that line will fail unless it looks like the following:

"${RUNFILES}/external/io_bazel_rules_closure/third_party/phantomjs/bin/phantomjs" "$@"

What is the best strategy for dealing with this?

See also: bazelbuild/rules_closure/pull/23 and bazelbuild/rules_closure/issues/19

@kchodorow
Copy link
Contributor

See #848.

The main thing I'm working on now is fixing this, actually. Basically we'll be moving all of the external repositories "down" a couple directories, so your runfiles tree will look like:

bin.runfiles/
    io_bazel_rules_closure/
        WORKSPACE
        some-runfiles
    some_other_repo/
        ...
    another_repo/
        ...

This way, regardless of whether the repo is local or remote, it will be in the same place WRT runfiles.

@kchodorow kchodorow self-assigned this Mar 25, 2016
@jart
Copy link
Contributor Author

jart commented Mar 26, 2016

This is great news @kchodorow. Any estimate on when this will make it into HEAD?

@kchodorow
Copy link
Contributor

I'm working on it, but it's a huge change. I'm guessing a couple of weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants