BitFun icon indicating copy to clipboard operation
BitFun copied to clipboard

[Bug]: dead_code/unused_imports warnings for unix-only CLI dispatch and daemon symbols on Windows builds

Open 1688mengdie opened this issue 3 months ago • 1 comments

Every CI run prints a cargo compatibility hint from the metadata validation steps, once per step.

Symptom

The three metadata verification steps in .github/workflows/ci.yml run cargo metadata --locked --no-deps without an explicit output format:

  • Verify committed Cargo metadata (ci.yml:263)
  • Verify committed release metadata (ci.yml:507)
  • Verify projected release metadata (ci.yml:600)

On these steps cargo emits a hint that the default output format will change in a future release, so the hint is repeated in every CI job that runs them.

Root cause

The steps rely on cargo's current default format implicitly. Any invocation without an explicit --format-version is treated by cargo as potentially format-dependent, which produces the compatibility hint and couples the step output to whatever the toolchain considers current.

Proposed fix

Append --format-version 1 — the format version cargo uses today — to each of the three steps so the output contract is pinned explicitly. No step logic or parsing behavior changes: format version 1 is exactly what the steps consume today.

Verification

  • The workflow yaml re-parses cleanly with the three updated run: lines, and a grep audit confirms all three cargo metadata invocations in ci.yml carry the flag.
  • A CI run on the fix branch shows the hint gone from all three steps while the steps stay green.

1688mengdie avatar Aug 27 '26 22:08 1688mengdie

Withdrawn by the author immediately after creation: this was filed against the wrong change set (a body draft for a different issue was attached by mistake). The correct report will be re-filed separately. Closing to keep the tracker clean.

1688mengdie avatar Aug 27 '26 22:08 1688mengdie