-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Improve watch mode #1542
Comments
This would be highly appriciated feature as I run this in watch mode while developing and having the CLI crash out constantly isn't quite the DX you want. Just having the json parsing in a try-catch block could help to not crash the software |
Hi @Matsuuu, please try the latest release v0.64.1 and let me know if it works as expected! |
I am still getting crashes on the latest package version.
I can try and make a minimal repro repository at some point if needed |
@Matsuuu Are you able to find out why is it failing? What kind of request is it sending vs expected? |
So I'm running a background service, which needs to be taken down, re-built and then started again, due to it not supporting a watch mode. When I take the API down, the watch mode breaks as it's not able to query the endpoint. Any setup I tried that supports actual watch modes worked flawlessly with this, but a compiled API that needs a "full restart" with a few seconds of downtime will break the watch mode. The stacktrace points at I understand that the API being down should result in an warning / error but when using watch mode, I think a good dev experience would be that it just reports that "I'm not able to find anything at pointed url", instead of straight up throwing and error and stopping the whole process. This can be easily simulated here by following the steps: Starting the api, starting the app, shutting down the api. I would like that either by default, or via a flag these situations wouldn't crash the watcher. I think there's 2 approaches to this.
I'd be happy to discuss further as I'm starting to adopt this tool in plenty of my projects and maybe even contributing if there's spots to contribute to. |
Provided a small PR that fixes it. It ain't the most elegant thing but it does the job. I'd be happy to discuss if there's a better way #1748 |
Yep, will merge, thank you! |
The text was updated successfully, but these errors were encountered: