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 diff check Job #5821

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Fix diff check Job #5821

merged 3 commits into from
Jul 12, 2023

Conversation

ytmimi
Copy link
Contributor

@ytmimi ytmimi commented Jul 10, 2023

A few fixes for the diff-check job. The first bullet below is the most impactful, and to my knowledge the current job is broken without it. The other two are mostly quality of life improvements.

  • Since we build rustfmt from source we also need to add the correct sysroot to LD_LIBRARY_PATH. See rustfmt 1.5.2 runtime failure #5675
  • set -e to propagate errors so we'll be alerted to issues more quickly in the future
  • A minor bug fix for scenarios where you want to pass optional configs to the feature rustfmt binary, but don't specify a commit hash.

r? @calebcartwright

ytmimi added 3 commits July 10, 2023 09:31
There were some upstream changes made a while back that requires this to
be set when building rustfmt from source like we do in the
`check_diff.sh` script.

See issue 5675 for more details.
The `set -e` option is used to immediately exit if any command exits
with a non zero exit status. This will help us catch errors in the
script, for example, needing the `LD_LIBRARY_PATH` to be set.
There was an issue with the script when passing optional rustfmt configs
without specifying a commit hash. Because these optional values are
passed via positional arguments the configs ($4)  would be used in place
of the commit hash ($3). Now that we set a default value for the
optional commit hash we avoid this problem.
@calebcartwright calebcartwright merged commit d698bf4 into rust-lang:master Jul 12, 2023
@ytmimi
Copy link
Contributor Author

ytmimi commented Jul 12, 2023

@calebcartwright thanks for getting this in! I'll likely have a follow up PR to add some new features to the diff-check job. Stay tuned 😁

@ytmimi ytmimi deleted the fix-diff-check branch July 12, 2023 13:41
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