-
Notifications
You must be signed in to change notification settings - Fork 0
Add watch command for auto-regeneration #5
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new watch command to cfgx that automatically regenerates Go code when TOML configuration files change, enabling a more efficient development workflow.
- Introduces file watching capabilities using the fsnotify library
- Implements debouncing to prevent rapid regenerations during file edits
- Handles common editor save patterns (file removal/recreation)
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Adds fsnotify v1.9.0 dependency for file watching functionality |
| go.sum | Updates checksums for new dependencies (fsnotify and its transitive dependency golang.org/x/sys) |
| cmd/cfgx/main.go | Implements the new watch command with file monitoring, debouncing, and signal handling |
| readme.md | Documents the new watch command with usage examples and flag descriptions |
| ROADMAP.md | New file outlining planned features and project roadmap, marking watch as implemented |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
go.mod:3
- Go 1.25.1 does not exist. As of January 2025, the latest Go version is 1.23.x. This should be updated to a valid Go version such as
go 1.23or an earlier version.
go 1.25.1
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📊 Code Coverage ReportCoverage by file |
Add watch command for auto-regeneration
Implements a new
cfgx watchcommand that monitors TOML configuration files and automatically regenerates Go code when changes are detected.Key Features:
Changes:
watchsubcommand to CLI