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

Add mention of tools.go to FAQ #189

Merged
merged 2 commits into from
Apr 29, 2022
Merged

Add mention of tools.go to FAQ #189

merged 2 commits into from
Apr 29, 2022

Conversation

benjaminjkraft
Copy link
Collaborator

This came up in #160, and will surely come up again. I hope the Go
folks figure out something better here, but until such time...

I have:

  • Written a clear PR title and description (above)
  • Signed the Khan Academy CLA
  • Added tests covering my changes, if applicable
  • Included a link to the issue fixed, if applicable
  • Included documentation, for new features
  • Added an entry to the changelog

This came up in #160, and will surely come up again. I hope the Go
folks figure out something better here, but until such time...
Copy link
Member

@csilvers csilvers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

docs/FAQ.md Outdated

### … genqlient fail after `go mod tidy`?

If genqlient fails with an error `missing go.sum entry for module providing package`, this is typically because `go mod tidy` removed its dependencies because they weren't imported by your Go module. You can read more about this in golang/go#45552; see in particular [this comment](https://github.com/golang/go/issues/45552#issuecomment-819545037). In short, if you want to be able to `go run` on newer Go you'll need to have a (blank) import of genqlient's entrypoint in a special `tools.go` file somewhere in your module so `go mod tidy` doesn't prune it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you want to give a specific example: "if genqlient puts its generated files in xxxx, your tools.go file would look like this.". Though maybe that's not so easy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done.

@benjaminjkraft benjaminjkraft merged commit c8cbe80 into main Apr 29, 2022
@benjaminjkraft benjaminjkraft deleted the benkraft.faq branch April 29, 2022 20:26
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

Successfully merging this pull request may close these issues.

2 participants