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 --watch flag for generate command to regenerate files on changes #3208

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fira42073
Copy link

buf generate --watch is a blocking call that uses https://github.com/fsnotify/fsnotify to watch filesystem changes and regenerate code.

Fix #2418

@CLAassistant
Copy link

CLAassistant commented Aug 4, 2024

CLA assistant check
All committers have signed the CLA.

@fira42073
Copy link
Author

I've also bumped up the docker version from v27.0.0 to v27.0.01 to avoid the issue

go: downloading github.com/docker/docker v27.0.0+incompatible
go: github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugindocker imports
        github.com/docker/docker/api/types: reading github.com/docker/docker/go.mod at revision v27.0.0: unknown revision v27.0.0
go: github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugindocker imports
        github.com/docker/docker/api/types/image: reading github.com/docker/docker/go.mod at revision v27.0.0: unknown revision v27.0.0
go: github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugindocker imports
        github.com/docker/docker/client: reading github.com/docker/docker/go.mod at revision v27.0.0: unknown revision v27.0.0
go: github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugindocker imports
        github.com/docker/docker/pkg/jsonmessage: reading github.com/docker/docker/go.mod at revision v27.0.0: unknown revision v27.0.0
go: github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugindocker imports
        github.com/docker/docker/pkg/stringid: reading github.com/docker/docker/go.mod at revision v27.0.0: unknown revision v27.0.0

More context: https://bufbuild.slack.com/archives/CRZ680FUH/p1722779009632599

@doriable doriable self-requested a review August 5, 2024 14:24
@bufdev
Copy link
Member

bufdev commented Aug 21, 2024

Thanks for the PR. We don't have too much bandwidth to dive into this at the moment, but we'll get back to you. There are some issues with how the watch is handling inputs, and the separation of concerns with the os package, but we unfortunately can't dive into them at the moment.

@bufdev bufdev changed the title Add --watch flag for generate command to regenerate files on changes. PAUSED: Add --watch flag for generate command to regenerate files on changes Aug 21, 2024
@bufdev bufdev changed the title PAUSED: Add --watch flag for generate command to regenerate files on changes Add --watch flag for generate command to regenerate files on changes Aug 21, 2024
@bufdev bufdev added the Paused label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add watch for generate
3 participants