[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55242] [PATCH 04/10] guix: import: go: Fix the interpretation of th
From: |
Maxime Devos |
Subject: |
[bug#55242] [PATCH 04/10] guix: import: go: Fix the interpretation of the replace directive. |
Date: |
Tue, 03 May 2022 18:26:15 +0200 |
User-agent: |
Evolution 3.38.3-1 |
Attila Lendvai schreef op di 03-05-2022 om 13:42 [+0200]:
> + (define (maybe-replace old-module-path old-version new-module-path
> new-version)
> + (let ((matched-entry (assoc-ref requirements old-module-path)))
> + (log.debug "inside maybe-replace, ~S ~S => ~S ~S, matched-entry ~S"
> + old-module-path old-version new-module-path new-version
> matched-entry)
> + (cond ((and (equal? old-module-path new-module-path)
> + (not matched-entry))
> + ;; "A replace directive has no effect if the module version
> on the left
> + ;; side is not required."
> + ;; Do not allow version updates for indirect dependencies.
> + requirements)
> + ((and matched-entry
> + (or (not old-version)
> + (equal? old-version new-version)))
> + (cons (list new-module-path new-version)
> + (alist-delete old-module-path requirements)))
> + (else
> + requirements))))
There's some extra complexity here, so I recommend some corresponding
extra tests, to avoid it breaking in the future.
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
[bug#55242] [PATCH 09/10] guix: import: go: module-name -> module-path to be consistent, Attila Lendvai, 2022/05/03
[bug#55242] [PATCH 10/10] guix: import: go: Better handling of /v2 in the module path., Attila Lendvai, 2022/05/03
[bug#55242] [PATCH 04/10] guix: import: go: Fix the interpretation of the replace directive., Attila Lendvai, 2022/05/03
[bug#55242] [PATCH 08/10] guix: import: go: Modules in a subdir and prefixed tags., Attila Lendvai, 2022/05/03
[bug#55242] [PATCH 08/10] guix: import: go: Modules in a subdir and prefixed tags., Maxime Devos, 2022/05/03
[bug#55242] [PATCH 08/10] guix: import: go: Modules in a subdir and prefixed tags., Maxime Devos, 2022/05/03
[bug#55242] [PATCH 08/10] guix: import: go: Modules in a subdir and prefixed tags., Maxime Devos, 2022/05/03