Skip to content

Commit 250666c

Browse files
abueideclaude
andcommitted
fix(ci): resolve rustup conflict in CI for segkit checks
The Ubuntu CI runners have a pre-installed ~/.rustup toolchain that conflicts with the Nix-managed Rust from devbox. When devbox's cargo invokes clippy/rustfmt, the system rustup intercepts and tries to sync components, causing file rename errors. Fixes: - Remove system rustup in the Segkit CI job before running devbox - Remove rustfmt/clippy from treefmt.toml — they are project-level tools that don't fit treefmt's per-file model and were triggering the same rustup conflict in the Lint job. Rust checks now run exclusively in the dedicated Segkit CLI CI job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 67aa1fc commit 250666c

2 files changed

Lines changed: 8 additions & 27 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v6
3737

38+
- name: Remove system Rust toolchain
39+
run: rustup self uninstall -y || true
40+
3841
- name: Install Devbox
3942
uses: jetify-com/devbox-install-action@v0.15.0
4043
with:

treefmt.toml

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# treefmt configuration
2-
# Validates shell scripts, GitHub workflows, process-compose configs, and Rust code
2+
# Validates shell scripts, GitHub workflows, and process-compose configs
3+
#
4+
# Note: Rust checks (rustfmt, clippy) are NOT included here because they are
5+
# project-level tools that don't work well with treefmt's per-file model.
6+
# Run them via: devbox run segkit:check
37
#
48
# Usage:
59
# treefmt # Run validators on all files
@@ -78,29 +82,3 @@ includes = [
7882
"examples/*/tests/*.yaml",
7983
]
8084
excludes = []
81-
82-
# Rust formatting via rustfmt
83-
[formatter.rustfmt]
84-
command = "sh"
85-
options = [
86-
"-c",
87-
'''
88-
cargo fmt --manifest-path segkit/Cargo.toml -- --check "$@" 2>&1 || exit 1
89-
''',
90-
"--"
91-
]
92-
includes = ["segkit/src/**/*.rs", "segkit/tests/**/*.rs"]
93-
excludes = []
94-
95-
# Rust linting via clippy
96-
[formatter.clippy]
97-
command = "sh"
98-
options = [
99-
"-c",
100-
'''
101-
cargo clippy --manifest-path segkit/Cargo.toml -- -D warnings 2>&1 || exit 1
102-
''',
103-
"--"
104-
]
105-
includes = ["segkit/src/**/*.rs", "segkit/tests/**/*.rs"]
106-
excludes = []

0 commit comments

Comments
 (0)