question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows, native launcher: sh_binary doesn't have `rlocation`

See original GitHub issue

When using the native launcher, the .exe launcher created from sh_binary rules doesn’t define rlocation for the shell script.

Normally rlocation is defined for shell tests because they all run https://github.com/bazelbuild/bazel/blob/master/tools/test/test-setup.sh which defines and exports this function.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
laszlocsomorcommented, Oct 9, 2017

Actually, I like your idea more than my own! Let me accommodate that in my CL.

0reactions
laszlocsomorcommented, May 2, 2018

I’m closing this bug as obsolete.

The sh_binary on non-Windows uses no launcher, so there’s nothing to load whatever defines rlocation. If users want to write platform-independent sh_* rules, they’ll need to source the rlocation-defining library manually (copy-pasting the code to do so from the runfiles library itself).

Automatically sourcing the file on Windows encourages writing non-portable Bash scripts, and is unnecessary if the scripts will have the copy-pasted initializer code anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Windows, native launcher: sh_binary doesn't have ...
When using the native launcher, the .exe launcher created from sh_binary rules doesn't define rlocation for the shell script.
Read more >
bazel sh_binary example | The Search Engine You Control
If I build the Android hello world example without the --python_path flag, I get a strange "LAUNCHER ERROR" message. The reason is that...
Read more >
src/BUILD - bazel - Git at Google
TODO(philwo): Clean this up, once a Bazel that can run py_binary and sh_binary. # in Starlark rules on Windows has been released. [filegroup(....
Read more >
Windows 11 - Unable to update the Minecraft Native Launcher
I am trying to install the Minecraft Launcher on my Windows 11 PC. Every time, I reach the Minecraft Updater, it gets about...
Read more >
Fix "Unable to Update the Minecraft Native Launcher" - YouTube
Updated Minecraft to the Microsoft Store Minecraft Launcher, but can't start it up now due to an "Unable to Update the Minecraft Native...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found