diff --git a/.github/workflows/linux-binaries.yml b/.github/workflows/linux-binaries.yml index af21924880..b10974561b 100644 --- a/.github/workflows/linux-binaries.yml +++ b/.github/workflows/linux-binaries.yml @@ -126,7 +126,7 @@ jobs: cache-on-failure: ${{ inputs.cache_write && github.event_name != 'pull_request' }} - name: Verify committed Cargo metadata - run: cargo metadata --locked --no-deps + run: cargo metadata --locked --no-deps --format-version 1 - name: Patch build version shell: bash @@ -143,7 +143,7 @@ jobs: node scripts/set-build-version.mjs --version "$ASSET_VERSION" - name: Verify projected Cargo metadata - run: cargo metadata --locked --no-deps + run: cargo metadata --locked --no-deps --format-version 1 - name: Build CLI and Relay Server shell: bash diff --git a/.github/workflows/nightly-artifacts.yml b/.github/workflows/nightly-artifacts.yml index 62dda2c5aa..15ee36ac90 100644 --- a/.github/workflows/nightly-artifacts.yml +++ b/.github/workflows/nightly-artifacts.yml @@ -158,7 +158,7 @@ jobs: cache-on-failure: ${{ inputs.cache_write && github.event_name != 'pull_request' }} - name: Verify committed Cargo metadata - run: cargo metadata --locked --no-deps + run: cargo metadata --locked --no-deps --format-version 1 - name: Install dependencies run: pnpm install --frozen-lockfile @@ -204,7 +204,7 @@ jobs: echo "Cargo.toml version: $(grep 'x-release-please-version' Cargo.toml)" - name: Verify projected Cargo metadata - run: cargo metadata --locked --no-deps + run: cargo metadata --locked --no-deps --format-version 1 - name: Run Windows CLI terminal contracts if: runner.os == 'Windows' diff --git a/scripts/check-github-config.test.mjs b/scripts/check-github-config.test.mjs index b2d9bddae6..4957d9d6d8 100644 --- a/scripts/check-github-config.test.mjs +++ b/scripts/check-github-config.test.mjs @@ -702,7 +702,7 @@ test('nightly validates generated inputs and projected lockfiles before packagin metadataIndex < buildIndex, 'nightly must verify the projected lockfile before nested locked build hooks run', ); - const expectedMetadata = 'cargo metadata --locked --no-deps'; + const expectedMetadata = 'cargo metadata --locked --no-deps --format-version 1'; assert.equal(steps[committedMetadataIndex].run, expectedMetadata); assert.equal(steps[metadataIndex].run, expectedMetadata); assert.equal(steps[installerI18nIndex].if, "runner.os == 'Windows'"); @@ -798,8 +798,8 @@ test('Linux binary packaging uses the shared locked version projection contract' ); assert.match(steps[patchIndex].run, /node scripts\/set-build-version\.mjs/); assert.doesNotMatch(steps[patchIndex].run, /sed -i/); - assert.equal(steps[committedIndex].run, 'cargo metadata --locked --no-deps'); - assert.equal(steps[projectedIndex].run, 'cargo metadata --locked --no-deps'); + assert.equal(steps[committedIndex].run, 'cargo metadata --locked --no-deps --format-version 1'); + assert.equal(steps[projectedIndex].run, 'cargo metadata --locked --no-deps --format-version 1'); assert.match(steps[buildIndex].run, /cargo build --locked --release/); const rustCache = steps.find((step) => step.uses?.startsWith('swatinem/rust-cache@'));