ci: remove legacy toolchain file usage
What changed, and why it matters
This commit is purely a cleanup of developer tooling. It removes old references to a pinned nightly Rust toolchain version from the pre-commit git hook and the justfile (a task runner). The actual toolchain version pins were already moved to the project's main Cargo.toml file in a previous change. There is no change to the library code, no change to how the software behaves for users, and no security relevance.
No security action needed. Review as normal build/CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes the nightly-version file usage from githooks/pre-commit and justfile. The pre-commit hook no longer runs cargo +$(cat ./nightly-version) clippy. The justfile replaces direct cargo +NIGHTLY_VERSION invocations with calls to a new rbmt (Rust Bitcoin Maintainer Tools) helper. This is a CI/build-script refactoring after migrating toolchain pins to the root Cargo.toml. No Rust source code is modified.
Changed components
githooks/pre-commitjustfileInspect captured patch +13 / −53
diff --git a/githooks/pre-commit b/githooks/pre-commit
index 9d873fd3..99725d3a 100755
--- a/githooks/pre-commit
+++ b/githooks/pre-commit
@@ -45,6 +45,3 @@ fi
# If there are whitespace errors, print the offending file names and fail.
git diff-index --check --cached "$against" -- || exit 1
-
-# Check that code lints cleanly.
-cargo +"$(cat ./nightly-version)" clippy --workspace --all-targets --all-features -- --deny warnings || exit 1
diff --git a/justfile b/justfile
index a5f48ed6..3bf34e5f 100644
--- a/justfile
+++ b/justfile
@@ -1,74 +1,37 @@
-set positional-arguments
-
-# Once just v1.39.0 is widely deployed, simplify with the `read` function.
-NIGHTLY_VERSION := trim(shell('cat "$1"', justfile_directory() / "nightly-version"))
-
alias ulf := update-lock-files
_default:
@just --list
# Install necessary dev tools on system.
-_install-tools:
+[group('system')]
+tools:
@{{justfile_directory()}}/contrib/ensure-maintainer-tools.sh
-# Run the given CI task using maintainer tools.
-[group('ci')]
-@ci task lock="recent": _install-tools
- RBMT_LOG_LEVEL=quiet cargo rbmt {{task}} --lock-file {{lock}}
-
-# Test workspace with stable toolchain.
-[group('ci')]
-ci-stable: (ci "test")
-
-# Lint workspace.
-[group('ci')]
-ci-lint: (ci "lint")
-
-# Generate documentation.
-[group('ci')]
-ci-docs: (ci "docs")
-
-# Generate documentation with nightly.
-[group('ci')]
-ci-docsrs: (ci "docsrs")
-
-# Run benchmarks.
-[group('ci')]
-ci-bench: (ci "bench")
-
-# Quick workspace lint.
-@lint:
- cargo +{{NIGHTLY_VERSION}} clippy --quiet --workspace --all-targets --all-features -- --deny warnings
+# Install workspace toolchains.
+[group('system')]
+@toolchains: tools
+ RBMT_LOG_LEVEL=quiet cargo rbmt toolchains > /dev/null
-# Quick workspace sanity check.
-@sane: lint
- cargo test --quiet --workspace --all-targets --no-default-features
- cargo test --quiet --workspace --all-targets --all-features
+# Setup rbmt and run with given args.
+@rbmt *args: toolchains
+ RBMT_LOG_LEVEL=quiet cargo rbmt {{args}}
# Format workspace.
-@fmt:
- cargo +{{NIGHTLY_VERSION}} fmt --all
-
-# Generate documentation (accepts cargo doc args, e.g. --open).
-@docsrs *flags:
- RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +{{NIGHTLY_VERSION}} doc --all-features {{flags}}
+@fmt: (rbmt "fmt")
# Check for API changes.
-[group('scripts')]
check-api:
{{justfile_directory()}}/contrib/check-for-api-changes.sh
+# Update the recent and minimal lock files.
+@update-lock-files: (rbmt "lock")
+
# Query the current API.
[group('scripts')]
@query-api crate command:
{{justfile_directory()}}/contrib/api.sh $1 $2
-# Update the recent and minimal lock files.
-[group('scripts')]
-@update-lock-files: _install-tools
- cargo rbmt lock
-
# Install githooks.
[group('scripts')]
githooks-install:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.