-
Notifications
You must be signed in to change notification settings - Fork 261
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 a spin dev
command
#1102
Comments
I like the idea overall, but I would tweak the rebuild behavior a bit:
Users can still opt-in to "watch everything" with |
Another option would be to delegate rebuilding "watch" behavior to a |
This would simplify the scope and I see it's merits, but I would still advocate for it to be built into Spin. CCing community members for visibility on this issue: @joepio @mreferre |
This would be an alternative to a default of "rerunning spin build when any file changes". Edit: Or maybe the confusion is from my formatting. The two bullet points aren't two options; they go together. |
This feels like not a good idea to me - I don't see that we need two separate commands here. Where there are things that need to be different in dev use and CI/production/server use, it should be the "production" mode that is on a flag, because a server doesn't care how long the command line is. If we really do feel that we have no choice but to have two separate commands for dev and CI/prod modes, I'd prefer the new command to be the "prod mode" one. There's a lot of messaging already behind
|
Having a separate "prod mode" subcommand ( tldr: I agree with @itowlson here. |
I wondered about |
@itowlson I hear you on keeping the branding around Given all that perhaps the new way to look at it would be: |
Closing this because we've made a number of changes that have made this irrelevant, in particular:
|
I propose that we add a new top level command
spin dev
. This command seeks to address two issues we have with the dev inner loop: a desire for directory watching/hot reloading (#148 #324) and confusion around where logs go (#993).When you run
spin dev
the following would happen:spin build
is run.spin up --follow-all
is run.spin dev
would become the new command designed for the dev inner loop experience. It would make finding logs trivial because they'll always be dumped tostdout
. It would also give us hot reloading. We can also turn on other things likewasm_backtrace_details
(#389) that we would only want turned on in a dev environment.The new user flow would become something like:
spin dev
spin deploy
spin build
andspin up
would then become more focused on the CI/CD and production use cases. This means we can keep the performant default of writing logs to disk forspin up
. It also means we don't have to clutter up these commands with flags for hot reloading. For example it would be confusing for them to have to do two flags for the dev workflowspin build --up --watch
.Note: One potential issue with this approach is that hot reloading can be a slippery slope of work and weird bugs. Perhaps this isn't a feature we want to maintain. However, IMO hot reloading is critical to the DX.
Note: When I refer to hot reloading I'm talking about completely rerunning
spin build
when any file changes. I'm not talking about a spin server grabbing new web assembly artifacts without stopping.The text was updated successfully, but these errors were encountered: