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

Generating in existing project is broken in v17.0.20 #2394

Closed
droslean opened this issue Sep 27, 2022 · 2 comments
Closed

Generating in existing project is broken in v17.0.20 #2394

droslean opened this issue Sep 27, 2022 · 2 comments

Comments

@droslean
Copy link

droslean commented Sep 27, 2022

What happened?

$ go run github.com/99designs/gqlgen generate
../../../../pkg/mod/github.com/99designs/gqlgen@v0.17.20/main.go:20:2: missing go.sum entry for module providing package github.com/urfave/cli/v2 (imported by github.com/99designs/gqlgen); to add:
	go get github.com/99designs/gqlgen@v0.17.20
../../../../pkg/mod/github.com/99designs/gqlgen@v0.17.20/codegen/field.go:15:2: missing go.sum entry for module providing package golang.org/x/text/cases (imported by github.com/99designs/gqlgen/codegen); to add:
	go get github.com/99designs/gqlgen/codegen@v0.17.20
../../../../pkg/mod/github.com/99designs/gqlgen@v0.17.20/codegen/field.go:16:2: missing go.sum entry for module providing package golang.org/x/text/language (imported by github.com/99designs/gqlgen/codegen); to add:
	go get github.com/99designs/gqlgen/codegen@v0.17.20
../../../../pkg/mod/github.com/99designs/gqlgen@v0.17.20/internal/imports/prune.go:15:2: missing go.sum entry for module providing package golang.org/x/tools/go/ast/astutil (imported by github.com/99designs/gqlgen/internal/imports); to add:
	go get github.com/99designs/gqlgen/internal/imports@v0.17.20
../../../../pkg/mod/github.com/99designs/gqlgen@v0.17.20/internal/code/packages.go:11:2: missing go.sum entry for module providing package golang.org/x/tools/go/packages (imported by github.com/99designs/gqlgen/codegen/config); to add:
	go get github.com/99designs/gqlgen/codegen/config@v0.17.20
../../../../pkg/mod/github.com/99designs/gqlgen@v0.17.20/internal/imports/prune.go:16:2: missing go.sum entry for module providing package golang.org/x/tools/imports (imported by github.com/99designs/gqlgen/internal/imports); to add:
	go get github.com/99designs/gqlgen/internal/imports@v0.17.20

What did you expect?

To re-generate everything

versions

  • go run github.com/99designs/gqlgen version?
    v0.17.20

  • go version?
    go version go1.18.1 linux/amd64

@vyj7
Copy link

vyj7 commented Oct 12, 2022

Try this if it helps:
go run -mod=mod github.com/99designs/gqlgen generate --verbose

@mehow-ves
Copy link

mehow-ves commented Oct 31, 2022

It worked for me, cheers .

PS C:\Work\Training\GO-TechHoliday\repo> go run github.com/99designs/gqlgen generate

C:\Users\michalw\go\pkg\mod\github.com\99designs\gqlgen@v0.17.20\main.go:20:2: missing go.sum entry for module providing package github.com/urfave/cli/v2 (imported by github.com/99designs/gqlgen)        go get github.com/99designs/gqlgen@v0.17.20
C:\Users\michalw\go\pkg\mod\github.com\99designs\gqlgen@v0.17.20\codegen\field.go:15:2: missing go.sum entry for module providing package golang.org/x/text/cases (imported by github.com/99designs/gqlgen/codegen); to add:
        go get github.com/99designs/gqlgen/codegen@v0.17.20
C:\Users\michalw\go\pkg\mod\github.com\99designs\gqlgen@v0.17.20\codegen\field.go:16:2: missing go.sum entry for module providing package golang.org/x/text/language (imported by github.com/99designs/gqlgen/codegen); to add:
        go get github.com/99designs/gqlgen/codegen@v0.17.20
C:\Users\michalw\go\pkg\mod\github.com\99designs\gqlgen@v0.17.20\internal\imports\prune.go:15:2: missing go.sum entry for module providing package golang.org/x/tools/go/ast/astutil (imported by github.com/99designs/gqlgen/internal/imports); to add:
        go get github.com/99designs/gqlgen/internal/imports@v0.17.20
C:\Users\michalw\go\pkg\mod\github.com\99designs\gqlgen@v0.17.20\internal\code\packages.go:11:2: missing go.sum entry for module providing package golang.org/x/tools/go/packages (imported by github.com/99designs/gqlgen/codegen/config); to add:
        go get github.com/99designs/gqlgen/codegen/config@v0.17.20
C:\Users\michalw\go\pkg\mod\github.com\99designs\gqlgen@v0.17.20\internal\imports\prune.go:16:2: missing go.sum entry for module providing package golang.org/x/tools/imports (imported by github.com/99designs/gqlgen/internal/imports); to add:
        go get github.com/99designs/gqlgen/internal/imports@v0.17.20

PS C:\Work\Training\GO-TechHoliday\repo> go run -mod=mod github.com/99designs/gqlgen generate --verbose

validation failed: packages.Load: C:\Work\Training\GO-TechHoliday\repo\graph\schema.resolvers.go:54:72: NewTodo not declared by package model
C:\Work\Training\GO-TechHoliday\repo\graph\schema.resolvers.go:54:89: Todo not declared by package model
C:\Work\Training\GO-TechHoliday\repo\graph\schema.resolvers.go:57:62: Todo not declared by package model

exit status 1

@droslean droslean closed this as completed Dec 7, 2022
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

3 participants