From 2ed8b61709b148e4500bc9fb70058bf7082e83eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= Date: Fri, 15 May 2026 13:52:28 -0700 Subject: [PATCH] ci: pass --locked to `cargo install --path cargo-pgrx` `cargo install --path` ignores `Cargo.lock` unless `--locked` is given, so every CI run re-resolved transitive deps fresh from crates.io. This recently started failing on the `verify package can build` job: the fresh resolution pulled in `rustix 0.37.28`, which uses `#[rustc_attrs]` attributes that the current nightly compiler rejects with: error: attributes starting with `rustc` are reserved for use by the `rustc` compiler --> rustix-0.37.28/src/backend/linux_raw/io/errno.rs:28:25 `Cargo.lock` on `develop` already pins `rustix 1.1.2`, which builds fine; the CI just wasn't honoring it. Add `--locked` to every `cargo install --path cargo-pgrx` invocation across the three workflow files (5 in tests.yml, 1 in runas.yml, 1 in package-test.yaml) so CI uses the same resolution as `cargo build` and becomes reproducible. --- .github/workflows/package-test.yaml | 2 +- .github/workflows/runas.yml | 2 +- .github/workflows/tests.yml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/package-test.yaml b/.github/workflows/package-test.yaml index 9ca0f7c063..5e7e989149 100644 --- a/.github/workflows/package-test.yaml +++ b/.github/workflows/package-test.yaml @@ -90,7 +90,7 @@ jobs: pg_config --version - name: Install cargo pgrx - run: cargo +nightly install --path cargo-pgrx --debug + run: cargo +nightly install --path cargo-pgrx --debug --locked - name: cargo pgrx init run: cargo +nightly pgrx init "--pg$PG_VER=$(which pg_config)" diff --git a/.github/workflows/runas.yml b/.github/workflows/runas.yml index a3f7aa7763..205a5c5bf6 100644 --- a/.github/workflows/runas.yml +++ b/.github/workflows/runas.yml @@ -92,7 +92,7 @@ jobs: rustup component add clippy - name: Install cargo pgrx - run: cd cargo-pgrx && cargo install --path . --debug + run: cd cargo-pgrx && cargo install --path . --debug --locked - name: cargo pgrx init run: cargo pgrx init --pg14=$(which pg_config) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 61ce36b536..8f9c97937f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -230,7 +230,7 @@ jobs: rustup component add clippy - name: Install cargo-pgrx - run: cargo install --path cargo-pgrx/ --debug --force + run: cargo install --path cargo-pgrx/ --debug --force --locked - name: Run 'cargo pgrx init' against system-level ${{ matrix.postgres }} run: cargo pgrx init --pg$PG_VER /usr/lib/postgresql/$PG_VER/bin/pg_config @@ -390,7 +390,7 @@ jobs: key: pgrx-arm64-cargo-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/Cargo.lock', '.github/workflows/tests.yml') }} - name: Install cargo-pgrx - run: cargo install --path cargo-pgrx/ --debug --force + run: cargo install --path cargo-pgrx/ --debug --force --locked - name: Run 'cargo pgrx init' against system-level ${{ matrix.postgres }} run: cargo pgrx init --pg$PG_VER /usr/lib/postgresql/$PG_VER/bin/pg_config @@ -494,7 +494,7 @@ jobs: rustup component add clippy - name: Install cargo-pgrx - run: cargo install --path cargo-pgrx/ --debug --force + run: cargo install --path cargo-pgrx/ --debug --force --locked - name: Run 'cargo pgrx init' run: cargo pgrx init --pg$PG_VER download @@ -621,7 +621,7 @@ jobs: rustup component add clippy - name: Install cargo-pgrx - run: cargo install --path cargo-pgrx/ --debug --force + run: cargo install --path cargo-pgrx/ --debug --force --locked - name: Print sccache stats run: sccache --show-stats @@ -698,7 +698,7 @@ jobs: run: sccache --show-stats - name: Install cargo-pgrx - run: cargo install --path cargo-pgrx/ --debug --force + run: cargo install --path cargo-pgrx/ --debug --force --locked - name: Install rustfmt & clippy run: |