Skip to content

Windows, native launcher: sh_binary missing data dependencies #3839

Closed

Description

@laszlocsomor

Description of the problem / feature request / question:

When using the native launcher, sh_binary rules miss their data dependencies.

If possible, provide a minimal example to reproduce the problem:

C:\work\bazel> bazel build //examples/shell:bin
(...)

C:\work\bazel> bazel-bin\examples\shell\bin.exe
C:/work/bazel/examples/shell/bin.sh: line 23: C:/work/bazel/examples/shell/bin.sh.runfiles/io_bazel/examples/shell/lib.sh: No such file or directory

Environment info

  • Operating System:
    Windows 10

  • Bazel version (output of bazel info release):
    0.6.0

Activity

  1. added
    P1
    on Sep 29, 2017
  2. laszlocsomor commented on Oct 5, 2017

    @laszlocsomor
    ContributorAuthor

    Never mind, this is not a bug in the launcher, but in the example. I'll send a fix.

  3. self-assigned this
    on Oct 5, 2017
  4. laszlocsomor commented on Oct 6, 2017

    @laszlocsomor
    ContributorAuthor

    One possible fix is to define and use rlocation in the shell script. Another is for the launcher to source a script that defines rlocation, then run the main script. I have a pending change for the latter.

  5. laszlocsomor commented on Dec 13, 2017

    @laszlocsomor
    ContributorAuthor

    This bug directly influences the usability of sh_* rules on Windows.

    I'd like Bazel to treat shell scripts as just another language like Python, and to require Bash only if the targets depend on sh_* rules.

    I'm making this P3 for now, because I believe other languages are more important on Windows and the practical limitation with a sub-par support for sh_* rules is that we can't use them to implement build-aiding tools as easily as we can on Linux.

  6. added
    P3
    and removed
    P1
    on Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3category: misc > miscplatform: windowstype: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions