Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic with no further information on bad go version #181

Open
EliRibble opened this issue Dec 28, 2024 · 0 comments
Open

panic with no further information on bad go version #181

EliRibble opened this issue Dec 28, 2024 · 0 comments

Comments

@EliRibble
Copy link

I have a project that depends on something that requires go >= 1.23. When I run gomod2nix I get a panic like:

INFO[0000] Parsing go.mod                                modPath=go.mod
INFO[0000] Downloading dependencies                      
panic: error generating pkgs:     

goroutine 1 [running]:
github.com/nix-community/gomod2nix/internal/cmd.generateFunc(0xc000180700?, {0xc47f80?, 0x4?, 0x877446?})
        /home/eliribble/src/gomod2nix/internal/cmd/root.go:67 +0x40e
github.com/spf13/cobra.(*Command).execute(0xbe1180, {0xc000118040, 0x0, 0x0})
        /home/eliribble/go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0xbe1180)
        /home/eliribble/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        /home/eliribble/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
github.com/nix-community/gomod2nix/internal/cmd.Execute()
        /home/eliribble/src/gomod2nix/internal/cmd/root.go:124 +0x1a
main.main()
        /home/eliribble/src/gomod2nix/main.go:6 +0xf

That's it. What it should look like is something like this:

INFO[0000] Parsing go.mod                                modPath=go.mod                                                                                                
INFO[0000] Downloading dependencies                                                
panic: error generating pkgs: Failed to generate packages in ./ with path gomod2nix.toml: Failed to run 'go mod download --json: exit status 1                         
go: github.com/go-webauthn/[email protected]: module github.com/go-webauthn/[email protected] requires go >= 1.23 (running go 1.21.4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant