Fix Diff-Check job for subtree sync PRs #5953
Merged
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.
rustfmt currently has a runtime dependency on the sysroot. So when we build a standalone rustfmt binary we need to set
LD_LIBRARY_PATH
so each rustfmt binary knows where to find it's dependencies.When running our
Diff-Check
job to test PRs for breaking changes it's often the case that both the master rustfmt binary and the feature branch binary have the same runtime dependencies so we only need to setLD_LIBRARY_PATH
once.However, when running the diff-check job against a subtree sync PR that assumption doesn't hold. The subtree sync PR bumps the required toolchain used to build rustfmt and therefore the binary that gets built for the subtree sync PR has a different runtime dependency than the master rustfmt binary.
Now we set
LD_LIBRARY_PATH
twice to account for this potential difference.