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

Windows, *_binary launcher: should work when rule is in an external repo #3491

Closed
laszlocsomor opened this issue Aug 2, 2017 · 5 comments
Closed
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) platform: windows type: bug

Comments

@laszlocsomor
Copy link
Contributor

If a {sh,py,java}_binary rule is in an external repository (e.g. @bazel_tools//tools/android:zip_manifest_creator), its exe launcher doesn't work because, in the case of sh_binary for example, the bash_main_path variable's value is computed from runfiles-relative path, which is "../build_tools/android/tools/zip_manifest_creator.sh" (relative to the execroot), which is not a valid entry in the manifest file.

Instead the rule should substitute the main file's exec path into bash_main_file, because that's the path in the manifest.

@laszlocsomor laszlocsomor added platform: windows P2 We'll consider working on this in future. (Assignee optional) type: bug labels Aug 2, 2017
@laszlocsomor
Copy link
Contributor Author

Release-critical for 0.5.4 / 0.6.0.

@dslomov
Copy link
Contributor

dslomov commented Aug 2, 2017

We only use the launcher for sh_binary, right?
Consider also rolling back the use of new launcher for 0.5.4

@laszlocsomor
Copy link
Contributor Author

@meteorcloudy already fixed this with a oneliner

@laszlocsomor
Copy link
Contributor Author

Yet you have a good point; the launcher may have other bugs we don't know about.
@meteorcloudy : How hard would be restoring the old launcher script mechanism, and adding a new command line flag (e.g. --windows_exe_launcher) that enables the exe launcher? That way we can roll out the feature as an rc file push, not as a release.

@meteorcloudy
Copy link
Member

@laszlocsomor That's a good idea, and it shouldn't be too hard to do this.

bazel-io pushed a commit that referenced this issue Aug 4, 2017
If this is enabled, Bazel will build a Windows native exe binary
launcher for sh_binary, in the future this flag will also
apply to py_binary and java_binary.

By default, it's turned ON, set --windows_exe_launcher=0 to turn it off.

Fix #3491

Change-Id: Ic55bff745670446e585e3cc62af9dc6561527d4f
PiperOrigin-RevId: 164234552
buchgr pushed a commit that referenced this issue Aug 7, 2017
Fix #3491

RELNOTES: None
PiperOrigin-RevId: 164089270
buchgr pushed a commit that referenced this issue Aug 7, 2017
If this is enabled, Bazel will build a Windows native exe binary
launcher for sh_binary, in the future this flag will also
apply to py_binary and java_binary.

By default, it's turned ON, set --windows_exe_launcher=0 to turn it off.

Fix #3491

Change-Id: Ic55bff745670446e585e3cc62af9dc6561527d4f
PiperOrigin-RevId: 164234552
buchgr pushed a commit that referenced this issue Aug 11, 2017
Fix #3491

RELNOTES: None
PiperOrigin-RevId: 164089270
buchgr pushed a commit that referenced this issue Aug 11, 2017
If this is enabled, Bazel will build a Windows native exe binary
launcher for sh_binary, in the future this flag will also
apply to py_binary and java_binary.

By default, it's turned ON, set --windows_exe_launcher=0 to turn it off.

Fix #3491

Change-Id: Ic55bff745670446e585e3cc62af9dc6561527d4f
PiperOrigin-RevId: 164234552
buchgr pushed a commit that referenced this issue Aug 21, 2017
Fix #3491

RELNOTES: None
PiperOrigin-RevId: 164089270
buchgr pushed a commit that referenced this issue Aug 21, 2017
If this is enabled, Bazel will build a Windows native exe binary
launcher for sh_binary, in the future this flag will also
apply to py_binary and java_binary.

By default, it's turned ON, set --windows_exe_launcher=0 to turn it off.

Fix #3491

Change-Id: Ic55bff745670446e585e3cc62af9dc6561527d4f
PiperOrigin-RevId: 164234552
buchgr pushed a commit that referenced this issue Aug 22, 2017
Fix #3491

RELNOTES: None
PiperOrigin-RevId: 164089270
buchgr pushed a commit that referenced this issue Aug 22, 2017
If this is enabled, Bazel will build a Windows native exe binary
launcher for sh_binary, in the future this flag will also
apply to py_binary and java_binary.

By default, it's turned ON, set --windows_exe_launcher=0 to turn it off.

Fix #3491

Change-Id: Ic55bff745670446e585e3cc62af9dc6561527d4f
PiperOrigin-RevId: 164234552
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    Fix bazelbuild/bazel#3491

    RELNOTES: None
    PiperOrigin-RevId: 164089270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) platform: windows type: bug
Projects
None yet
Development

No branches or pull requests

3 participants