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
proposal: cmd/go: add a -watch option to go generate #36414
Comments
-watch
option
Thanks for the suggestion. However, the |
I think another reason not to do this is that we'd probably have to do it consistently for |
Just to add one final comment that it's already possible to use a file watcher (e.g. Building on @ianlancetaylor's point:
This was part of the motivation behind my work on the experimental I'd be happy to continue discussion/questions in that repo |
I understand and agree; closing this one for ya ! Thanks for taking the time to answer ! 🙂 |
TLDR: add
go generate -watch
to watch for changes in a folder to rungo generate
when a file is changed.I think go generate is really awesome. In the packer repo that I help maintain, a lot of code and docs are "go generated" and I think it would be nice to not have to think about running
go generate
every-time I change a file: making my programming a bit less disrupted; moreover this would make performances ofgo generate
less of a problem. Right now ago generate
is taking 8 minutes for us.My gut feeling tells me that making/maintaining this would be way too complicated for the gain but may be I'm wrong !
In the meantime I'll be using https://github.com/fsnotify/fsnotify
The text was updated successfully, but these errors were encountered: