GNU bug report logs -
#49202
guix import go type error (failed regex match?)
Previous Next
Full log
View this message in rfc822 format
Sarah Morgensen <iskarian <at> mgsn.dev> writes:
>
> // When updating replace rules, make sure to also update the rules in integration/client/go.mod
> replace (
> // prevent transitional dependencies due to containerd having a circular
> // dependency on itself through plugins. see .empty-mod/go.mod for details
> github.com/containerd/containerd => ./.empty-mod/
> github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
> // urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092
> github.com/urfave/cli => github.com/urfave/cli v1.22.1
> google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63
> )
>
> Based on the trace it seems like it's treating the k8s.io/utils require
> as a replace directive, but I have no idea why.
>
Looking at this again, I realize I misread the code: the "k8s.io/utils"
etc. is actually the head of the already-parsed requirements list.
Instead, when the error is thrown, we are in replace-directive, which is
called by in-replace...
--8<---------------cut here---------------start------------->8---
(define (in-replace requirements replaced)
(let ((line (read-line)))
(cond
((eof-object? line)
;; this should never happen here but we ignore silently
(values requirements replaced))
((string=? line ")")
;; end of block, coming back to toplevel
(toplevel requirements replaced))
(#t
(call-with-values (lambda ()
(replace-directive requirements replaced line))
in-replace)))))
--8<---------------cut here---------------end--------------->8---
...which does not handle comments. (Even the top-level parser doesn't
explicitly handle comments, it just discards any line that does not
start with "require" or "replace.")
Looks like the parser could use a little more robustness! :)
Hope that helps,
Sarah
This bug report was last modified 3 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.