matthiaskrgr / matthiaskrgr/cargo-cache

Fails to parse the 2024 edition in Cargo.toml

Open
#146 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
994
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I recently moved some crates to the 2024 edition, and now, cargo cache clean-unref fails with this error:

$ cargo cache clean-unref               
Cargo cache '/home/mat/.local/share/cargo':

Total:                                2.39 GB
  106 installed binaries:           730.28 MB
  Registry:                           1.65 GB
    3 registry indices:             263.89 MB
    4051 crate archives:            516.18 MB
    1263 crate source checkouts:    872.55 MB
  Git db:                             6.29 MB
    4 bare git repos:                 4.54 MB
    1 git repo checkouts:             1.74 MB

Failed to parse Cargo.toml at '/home/mat/work/thing/Cargo.toml': 'Json(Error("unknown variant `2024`, expected one of `2015`, `2018`, `2021`", line: 1, column: 90044))'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Cargo.toml edition parsing used by the cargo cache clean-unref entry point and identify where the supported editions are defined. Reproduce the failure with a Cargo.toml using edition 2024, then verify that cargo cache clean-unref parses it successfully without rejecting the edition.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.