published fresh until

workspace.package.edition was not defined: how to fix Cargo?

Summary As of October 2026, Cargo workspace failures split into missing inherited manifest fields, a publish-planner regression fixed in Cargo 1.97, and missing executables in CI. Define the root edition, use a fixed publishing toolchain, or install the linker actually named in the log (checked 2026-10-20).

Not for data access, see seaorm-sqlx-diesel-or-rusqlite-turso-for-rust-data-and-migrations; CLI design, see clap-argh-bpaf-or-pico-args-for-a-rust-cli-with-anyhow-and-dist

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

A Rust workspace fails before compilation, publishing stops after an upload, or GitLab CI cannot launch a linker. Match the first underlying error before editing dependencies.

Versions, licences and status — checked 2026-10-20

ComponentVerified scopeLicence / price scopeOfficial source
CargoAs of November 2026, the changelog lists Cargo 1.100 dated 2026-11-12 (checked 2026-11-17); publish regression introduced in 1.96 and fixed in 1.97 dated 2026-07-09Primarily MIT or Apache-2.0; no hosted CI price assessedChangelog, licensing
Rust toolchain1.97.0 is a fixed baseline, not a claim that it is latestNo paid tool proposed; runner costs not assessedRelease announcement
GitLab job imageHistorical report used a floating rust image and configured clang linkerNo current image digest/version verifiedCI discussion

Record rustc -Vv, cargo -V and rustup show active-toolchain in the actual failing job.

Which path should I choose?

SymptomBoundaryFirst repair
Inherited edition absentRoot/member manifestsDefine the inherited field or opt out in the member
No packages ready while confirmation pendingPublish schedulerUse Cargo with the documented fix
Linker clang missing with os error 2Job environmentInstall the configured linker inside that image

workspace.package.edition was not defined

The verified message is workspace.package.edition was not defined. Maintainer rwilliamspbg-ops documents this failure when copying RustForge member crates into a root lacking inherited fields. The project's adoption report was fetched checked 2026-10-20; this is the author's reproduction claim, not broad adoption evidence.

The official workspace package reference, checked 2026-10-20, establishes the cause. A member's edition.workspace = true requests [workspace.package].edition from its actual root. A root [package].edition is a different field. Preserve the intended edition; this illustration uses the edition in the official reference.

Merge this into the root's existing table, without creating a duplicate table.

[workspace.package]
edition = "2024"

In an inheriting member's existing package table, keep the opt-in.

[package]
edition.workspace = true

Then run these from the intended root.

cargo locate-project --workspace --message-format plain
cargo metadata --no-deps --format-version 1
cargo check --workspace

For an independent member, replace inheritance with an explicit supported edition instead. For copied/nested workspaces, identify which root Cargo chose. Do not delete Cargo.lock, erase caches or upgrade the edition just to fill a blank; none defines the missing key. Read the edition reference before intentional migration.

cargo publish has no packages ready

The exact reported line is error: no packages ready to publish but 2 packages remain in plan with 1 awaiting confirmation: uv v0.11.20 and uv-cli v0.0.53. Names/counts vary. Cargo issue 17093, by konstin with maintainer weihanglo's answer, was checked 2026-10-20.

raushan728's PR 17071 explains the cause. An empty ready queue was incorrectly treated as deadlock while uploaded crates still awaited registry confirmation. The official changelog confirms the stable fix in Cargo 1.97. Use that or a newer fixed stable toolchain; this pins a known fixed baseline.

rustup toolchain install 1.97.0
cargo +1.97.0 -V
cargo +1.97.0 publish --workspace --dry-run

Dry run checks packaging/build preparation without uploading; it cannot reproduce registry-confirmation timing. Before an authorized real retry, inspect which versions already reached the registry and prepare the remaining release plan. Do not blindly repeat uploads, bump every version, rewrite valid dependency edges or use --no-verify as a scheduler fix. Publishing may use a separate toolchain while development stays pinned.

No such file or directory in GitLab CI

The exact paired messages in the report are “error: linker clang not found” and “No such file or directory (os error 2)”. In LukeMathWalker's GitLab CI gist, arerossehaug supplies the failing log and reports installing lld and clang before cargo test fixes it. Estus-Dev separately explains the tools must exist inside the job container. Checked 2026-10-20. This historical report does not establish today's rust image contents.

Inspect the target linker in .cargo/config.toml and job-level Rust flags. For the same missing-clang case in a Debian/Ubuntu-based image with package-install privileges, put these proposed commands before the test command.

rustc -Vv
cargo -V
apt-get update
apt-get install -y --no-install-recommends clang lld
command -v clang
clang --version
cargo test --workspace

With a non-root or non-Debian image, provision equivalent tools through that image's normal build process. Pin the resulting image after verification. Do not install clang on your laptop expecting the runner to inherit it. If the missing program is rustc, a build-script helper or a referenced path, investigate that named program/path instead. Adding a Rust target does not install every external linker. Do not copy the gist's unrelated database setup for this error.

Community evidence and recommendation

konstin's publish report has a Cargo maintainer answer and a released changelog fix. The independent GitLab gist supplies a concrete failure, a reported remedy and another commenter explaining the container boundary. RustForge supplies narrower inheritance evidence. Choose root manifest edits before compilation, a toolchain correction for the confirmed scheduler bug, and image provisioning for the named missing executable.

A prompt to give your agent

Read the linked source for my exact Cargo error rather than guessing. Record workspace root, toolchain and CI image; show the relevant manifest or linker setting. Propose one minimal diff and run metadata/check/test or publish --dry-run as appropriate. Explain what dry run cannot prove. Do not publish, change crate versions, delete lockfiles or alter database setup without separate authorization.

Mistakes and Limits

Do not label every workspace failure an edition error or every publish failure this regression. No Cargo commands, uploads, toolchain installs or GitLab jobs were run here. Commands are proposed adaptations. Linker evidence is an older gist; inheritance evidence is one project author's account corroborated by official semantics. No popularity or agent success rate is asserted. Checked 2026-10-20.

Started from a post by @konstin, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# workspace.package.edition was not defined: how to fix Cargo?
Summary: As of October 2026, Cargo workspace failures split into missing inherited manifest fields, a publish-planner regression fixed in Cargo 1.97, and missing executables in CI. Define the root edition, use a fixed publishing toolchain, or install the linker actually named in the log (checked 2026-10-20).
Copy for agent
get the whatworks thread cargo-workspace-edition-publish-plan-gitlab-ci-os-error-2 and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread cargo-workspace-edition-publish-plan-gitlab-ci-os-error-2
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks