Skip to content

Commit 2562d17

Browse files
committed
ci(rust): exclude sqlshield-precommit from workspace builds
The new root `sqlshield-precommit` shim ships a `sqlshield` bin so `cargo install --path .` works for pre-commit, but it collides with sqlshield-cli's identical bin name during parallel `cargo build --workspace --all-targets` (Windows linker LNK1104). Skip the shim in default builds and CI; pre-commit installs it directly via --path.
1 parent 21e58f2 commit 2562d17

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: rustfmt
2525
run: cargo fmt --all --check
2626
- name: clippy
27-
run: cargo clippy --all-targets --all-features -- -D warnings
27+
run: cargo clippy --workspace --exclude sqlshield-precommit --all-targets --all-features -- -D warnings
2828

2929
test:
3030
name: test (${{ matrix.os }} / ${{ matrix.toolchain }})
@@ -46,6 +46,6 @@ jobs:
4646
with:
4747
key: ${{ matrix.os }}-${{ matrix.toolchain }}
4848
- name: build
49-
run: cargo build --workspace --all-targets --verbose
49+
run: cargo build --workspace --exclude sqlshield-precommit --all-targets --verbose
5050
- name: test
51-
run: cargo test --workspace --all-features --verbose
51+
run: cargo test --workspace --exclude sqlshield-precommit --all-features --verbose

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ members = [
77
"sqlshield-lsp",
88
"sqlshield-py",
99
]
10+
# Root `sqlshield-precommit` package is a pre-commit shim; exclude from
11+
# default builds so it doesn't clobber sqlshield-cli's `sqlshield` bin.
12+
default-members = [
13+
"sqlshield",
14+
"sqlshield-cli",
15+
"sqlshield-introspect",
16+
"sqlshield-lsp",
17+
"sqlshield-py",
18+
]
1019

1120
[workspace.package]
1221
version = "0.0.2"

0 commit comments

Comments
 (0)