-
Notifications
You must be signed in to change notification settings - Fork 0
Bump the Dylint dependency binaries to 6.0.1 #283
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8ac1ab5
Bump the Dylint dependency binaries to 6.0.1
25e56de
Validate Dylint tool versions in publish-check
aa328ed
Cover both dependency binaries in the manifest pin test
4213d21
Update the dependency-binary example in the developers guide
ef07e94
Fail fast throughout the publish-check recipe
05b1636
Extract Dylint tool provisioning into a tested script
ad973ad
Document the publish-check tool provisioning
fd3fb7b
Install host Dylint tools under a modern toolchain
1c519de
Wrap the toolchain note to the documentation line limit
9005e98
Share the matching-tool stub arrangement between tests
f37b466
Cover the publish-check provisioning handoff end to end
85c6091
Decompose the stub harness into per-command writers
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| [[dependency_binaries]] | ||
| package = "cargo-dylint" | ||
| binary = "cargo-dylint" | ||
| version = "4.1.0" | ||
| version = "6.0.1" | ||
| license = "MIT OR Apache-2.0" | ||
| repository = "https://github.com/trailofbits/dylint" | ||
|
|
||
| [[dependency_binaries]] | ||
| package = "dylint-link" | ||
| binary = "dylint-link" | ||
| version = "4.1.0" | ||
| version = "6.0.1" | ||
| license = "MIT OR Apache-2.0" | ||
| repository = "https://github.com/trailofbits/dylint" |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| #!/usr/bin/env sh | ||
| # install-dylint-tools.sh — Ensure the pinned cargo-dylint and dylint-link | ||
| # versions are available, installing into an isolated root when the | ||
| # system-wide binaries are missing or the wrong version. | ||
| # | ||
| # Usage: | ||
| # scripts/install-dylint-tools.sh TOOLS_ROOT CARGO_DYLINT_VERSION DYLINT_LINK_VERSION [CARGO] [TOOLCHAIN] | ||
| # | ||
| # When TOOLCHAIN is given, installs run under `cargo +TOOLCHAIN`. The | ||
| # host tools are toolchain-independent, but their locked dependencies | ||
| # can require a newer rustc than a repository's pinned nightly (e.g. | ||
| # cargo-dylint 6.0.1 locks cargo-util 0.2.28, which needs rustc 1.93), | ||
| # so callers pass a modern toolchain such as `stable`. | ||
| # | ||
| # TOOLS_ROOT is used as the cargo install --root; binaries land in | ||
| # TOOLS_ROOT/bin, which the caller should prepend to PATH when it exists. | ||
| # The root is only created when an install is needed, so callers can use | ||
| # its absence to mean "the system tools already match". | ||
| # | ||
| # cargo-dylint is probed via `cargo-dylint dylint --version` (the | ||
| # subcommand form: since 6.x the binary rejects a bare --version). | ||
| # dylint-link cannot be probed either way: it is a linker shim whose | ||
| # --version is forwarded to cc, so the installed version is read from | ||
| # `cargo install --list`. | ||
| # | ||
| # Exits non-zero if any required install fails, so callers never proceed | ||
| # with stale tools. | ||
| set -eu | ||
|
|
||
| if [ "$#" -lt 3 ] || [ "$#" -gt 5 ]; then | ||
| echo "usage: $0 TOOLS_ROOT CARGO_DYLINT_VERSION DYLINT_LINK_VERSION [CARGO] [TOOLCHAIN]" >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| tools_root=$1 | ||
| cargo_dylint_version=$2 | ||
| dylint_link_version=$3 | ||
| cargo=${4:-cargo} | ||
| toolchain=${5:-} | ||
|
|
||
| run_cargo() { | ||
| if [ -n "$toolchain" ]; then | ||
| "$cargo" "+$toolchain" "$@" | ||
| else | ||
| "$cargo" "$@" | ||
| fi | ||
| } | ||
|
|
||
| installed_cargo_dylint=$(cargo-dylint dylint --version 2>/dev/null | awk '{print $2}' || true) | ||
| if [ "$installed_cargo_dylint" != "$cargo_dylint_version" ]; then | ||
| run_cargo install --locked --version "$cargo_dylint_version" \ | ||
| --root "$tools_root" cargo-dylint | ||
| fi | ||
|
|
||
| if ! "$cargo" install --list 2>/dev/null | | ||
| grep -q "^dylint-link v$dylint_link_version:"; then | ||
| run_cargo install --locked --version "$dylint_link_version" \ | ||
| --root "$tools_root" dylint-link | ||
| fi |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.