Enhancement: apply Cargo `[patch]` tables the same way Go `replace` is applied
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust, typescript
Direzione di ricerca
Start with src/core-open/scanners/rust-scanner.ts, especially cargoDependencyHeader and parseCargoToml, then compare the existing handling in test/go-replace.test.ts and workspace inheritance tests. Add tests beside test/cargo-workspace-inheritance.test.ts for registry, git, path, named registry, and later-patch behavior. Done means the acceptance cases pass, including keeping path crates out of lockfile and SBOM components.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
- Difficulty: medium
- Area: Cargo / Rust scanner
Problem
cargoDependencyHeader / parseCargoToml in src/core-open/scanners/rust-scanner.ts (around lines 150–180 and 445–500) only read [dependencies], [dev-dependencies], [build-dependencies], and the target. / sub-table variants. [patch.crates-io] and [patch."<url>"] are ignored.
A workspace that patches serde to a git rev or a path crate is still looked up on crates.io at the version declared under [dependencies]. That is the same class of miss that go.mod replace already handles (test/go-replace.test.ts).
The deliberate Cargo SBOM rule still stands and is not part of this issue: the project’s own crate and local path crates stay out of the SBOM / lockfile component list.
Expected behaviour
After reading the manifest (and workspace inheritance), apply [patch] entries for the same crate name. A patch with a registry version overwrites the requirement used for crates.io / lockfile lookup, the way a module replace does. A git or path patch keeps the row visible but must not invent a crates.io version or query the registry for that crate (mirror local Go replace). Path patches must not reintroduce the excluded root / path crate into vg sbom export. [patch.crates-io] and named extra registries should both work. A later patch for the same name wins, or document a different pinned rule. Cargo.lock still supplies resolvedVersion when the locked package is a registry crate.
Acceptance
- New tests next to
test/cargo-workspace-inheritance.test.ts/test/go-replace.test.ts. [patch.crates-io] serde = { version = "1.0.200" }is the version used for aserde = "1.0"dependency.- A git patch does not query crates.io and does not invent a registry version.
- A path patch is not emitted as a lockfile / SBOM component.
- Manifests without
[patch]are unchanged.
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 3
- Merge medio
- 1g 22h
- PR unite (30g)
- 76
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vibgrate/cli
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vibgrate/cli
Issue simili
-
documentation Entwickler
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:frontend bug ci-test level:low priority:high
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
skytuhua-org/Gen-V1#2974 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
area: cli area: core priority: P3 type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
appandflow/stim#6736 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
naomiaro/waveform-playlist#973 ·
I maintainer di solito rispondono entro 1 giorno