-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bash, runfiles lib v2: shorter init code #8461
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2041eed
to
d9b5de4
Compare
The Bash Runfiles Library is now at its version 2. The new version has a shorter init code (copy-pasted "stanza"). The rlocation() function is unchanged. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). To demonstrate correctness, I updated: - mock binaries used in the runfiles tests - an actual test (help_test.sh)
FYI @alexeagle |
meteorcloudy
approved these changes
May 27, 2019
bazel-io
pushed a commit
that referenced
this pull request
May 28, 2019
*** Reason for rollback *** Broke many Bazel downstream projects https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1002#_ Culprit Finder: https://buildkite.com/bazel/culprit-finder/builds/162 *** Original change description *** Bash, runfiles lib v2: shorter init code The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. The rlocation() implementation is the same. Closes #8461. PiperOrigin-RevId: 250234181
bazel-io
pushed a commit
that referenced
this pull request
May 28, 2019
This CL rolls forward commit 229fe56, which was rolled back by commit 4f9110e. Reason for roll-forward: - Skydoc project on Bazel CI was broke because it used "set -e" instead of "set -euo pipefail", but the new runfiles library forced "set -euo pipefail" on it Differences between original and roll-forward: - remove "set -euo pipefail" from runfiles.bash, and move it to init code (like in v1 init), so users can employ a less strict mode - added comments to runfiles.bash explaining version compatibility - added test to ensure v1 init code can load v2 library Original description: The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. To use the new init code, you need Bazel 0.27 or newer. The old (longer) init code still works. Closes #8461. PiperOrigin-RevId: 250258548
irengrig
pushed a commit
to irengrig/bazel
that referenced
this pull request
Jun 18, 2019
The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. The rlocation() implementation is the same. Closes bazelbuild#8461. PiperOrigin-RevId: 250142259
irengrig
pushed a commit
to irengrig/bazel
that referenced
this pull request
Jun 18, 2019
*** Reason for rollback *** Broke many Bazel downstream projects https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1002#_ Culprit Finder: https://buildkite.com/bazel/culprit-finder/builds/162 *** Original change description *** Bash, runfiles lib v2: shorter init code The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. The rlocation() implementation is the same. Closes bazelbuild#8461. PiperOrigin-RevId: 250234181
irengrig
pushed a commit
to irengrig/bazel
that referenced
this pull request
Jun 18, 2019
This CL rolls forward commit 229fe56, which was rolled back by commit 4f9110e. Reason for roll-forward: - Skydoc project on Bazel CI was broke because it used "set -e" instead of "set -euo pipefail", but the new runfiles library forced "set -euo pipefail" on it Differences between original and roll-forward: - remove "set -euo pipefail" from runfiles.bash, and move it to init code (like in v1 init), so users can employ a less strict mode - added comments to runfiles.bash explaining version compatibility - added test to ensure v1 init code can load v2 library Original description: The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. To use the new init code, you need Bazel 0.27 or newer. The old (longer) init code still works. Closes bazelbuild#8461. PiperOrigin-RevId: 250258548
irengrig
pushed a commit
to irengrig/bazel
that referenced
this pull request
Jul 15, 2019
The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. The rlocation() implementation is the same. Closes bazelbuild#8461. PiperOrigin-RevId: 250142259
irengrig
pushed a commit
to irengrig/bazel
that referenced
this pull request
Jul 15, 2019
*** Reason for rollback *** Broke many Bazel downstream projects https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1002#_ Culprit Finder: https://buildkite.com/bazel/culprit-finder/builds/162 *** Original change description *** Bash, runfiles lib v2: shorter init code The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. The rlocation() implementation is the same. Closes bazelbuild#8461. PiperOrigin-RevId: 250234181
irengrig
pushed a commit
to irengrig/bazel
that referenced
this pull request
Jul 15, 2019
This CL rolls forward commit 229fe56, which was rolled back by commit 4f9110e. Reason for roll-forward: - Skydoc project on Bazel CI was broke because it used "set -e" instead of "set -euo pipefail", but the new runfiles library forced "set -euo pipefail" on it Differences between original and roll-forward: - remove "set -euo pipefail" from runfiles.bash, and move it to init code (like in v1 init), so users can employ a less strict mode - added comments to runfiles.bash explaining version compatibility - added test to ensure v1 init code can load v2 library Original description: The Bash Runfiles Library is now at its version 2. The new version has a shorter copy-pasted init code ("stanza") than v1. The init code does the bare minimum to load the runfiles library. Everything else is done in the library itself (e.g. export RUNFILES_* envvars). The rlocation() function is unchanged. To demonstrate correctness, I updated: - two mock binaries - two actual tests RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see `tools/bash/runfiles/runfiles.bash`. To use the new init code, you need Bazel 0.27 or newer. The old (longer) init code still works. Closes bazelbuild#8461. PiperOrigin-RevId: 250258548
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Bash Runfiles Library is now at its version 2.
The new version:
version of the new init code, which is suitable
if the source file's line length is limited
The init code does the bare minimum to load the
runfiles library. Everything else is done in the
library itself (e.g. export RUNFILES_* envvars).
The rlocation() function is unchanged.
To demonstrate correctness, I updated:
RELNOTES[NEW]: Bash, runfiles: the copy-pasted init code of the Bash runfiles library is now shorter, see
tools/bash/runfiles/runfiles.bash
. The rlocation() implementation is the same.