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

fix undefined variables in the wrap_outputs script #1278

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

novas0x2a
Copy link
Contributor

BUILD_TMPDIR and EXT_BUILD_DEPS were used in the wrapper script, but they weren't actually defined. This wasn't caught because the script prelude (which sets bash -u) wasn't used either.

This fix:

  • Adds the missing script prelude to the wrapper script
  • Generalizes get_env_prelude slightly so built_tools can use it directly, without needing to override variables
  • Passes the env prelude to wrapped_outputs so it can set those same variables
  • Prints out the paths to the build and deps dir at the end of a failed script, to make it easier to debug failed builds.

@novas0x2a novas0x2a marked this pull request as ready for review September 6, 2024 23:24
@novas0x2a
Copy link
Contributor Author

ping @jsharpe :)
(Also, I'll be going to bazelcon if you want to meet in person)

BUILD_TMPDIR and EXT_BUILD_DEPS were used in the wrapper script, but
they weren't actually defined. This wasn't caught because the script
prelude (which sets bash -u) wasn't used either.

This fix:
- Adds the missing script prelude to the wrapper script
- Generalizes get_env_prelude slightly so built_tools can use it
  directly, without needing to override variables
- Passes the env prelude to wrapped_outputs so it can set those same
  variables
- Prints out the paths to the build and deps dir at the end of a failed
  script, to make it easier to debug failed builds.
Copy link
Member

@jsharpe jsharpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@jsharpe jsharpe enabled auto-merge (squash) November 1, 2024 15:42
@jsharpe jsharpe merged commit 7729ee3 into bazel-contrib:main Nov 1, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants