diff options
| author | Sylvain Bellemare <sbellem@gmail.com> | 2026-05-27 23:46:52 +0900 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-06-04 11:51:25 +0300 |
| commit | 12eb77825ed22044efe95e3a4af82115b6520256 (patch) | |
| tree | c48e19d49bfce3dc9e62990e2dc1ae474d06b412 | |
| parent | 160b8502c86248e458a2421f6d018f077bd1884a (diff) | |
import: crate: Fix incomplete lockfile parsing.
`guix import crate --lockfile=` silently drops every `[[package]]`
block after the first one whose dependencies list contains a source
in parentheses, e.g. `"foo 1.2.3 (registry+https://...)"`.
* guix/import/crate/cargo-lock.scm (dependency-specification): Parse
dependencies that specify the source in parentheses.
Assisted-by: LLM coding agents
Change-Id: I62099c5a538799ba7d4fded7b3f448df459e6bf2
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
| -rw-r--r-- | guix/import/crate/cargo-lock.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/import/crate/cargo-lock.scm b/guix/import/crate/cargo-lock.scm index b03050a244e..3709a64f6ce 100644 --- a/guix/import/crate/cargo-lock.scm +++ b/guix/import/crate/cargo-lock.scm | |||
| @@ -81,7 +81,9 @@ | |||
| 81 | 81 | ||
| 82 | ;; dependency specification | 82 | ;; dependency specification |
| 83 | (define-peg-pattern dependency-specification all | 83 | (define-peg-pattern dependency-specification all |
| 84 | (and crate-name (? (and (ignore " ") crate-version)))) | 84 | (and crate-name |
| 85 | (? (and (ignore " ") crate-version)) | ||
| 86 | (? (ignore (and " (" crate-source ")"))))) | ||
| 85 | 87 | ||
| 86 | ;; dependencies | 88 | ;; dependencies |
| 87 | (define-peg-pattern crate-dependencies all | 89 | (define-peg-pattern crate-dependencies all |
