middleware icon indicating copy to clipboard operation
middleware copied to clipboard

Enable Hot-reload for CLI

Open samad-yar-khan opened this issue 1 year ago • 7 comments

Why do we need this ?

  • The current dev experience for the main app is made super convenient using ./dev.sh which triggers the CLI to manage the Docker containers
  • The dev experience for the CLI itself is not convenient as simple changes to the CLI require a reload.

Acceptance Criteria

  • [ ] Enable Hot reloading on the CLI
  • [ ] Make sure the hot reload to the CLI itself does not take too long and does not build the containers again from scratch

Further Comments / References

samad-yar-khan avatar Jun 07 '24 06:06 samad-yar-khan

Hey @samad-yar-khan Can you explain this issue in more detail

Currently we build and start the CLI its like starting point of the development server that handles everything and we have dev script in the CLI if someone want to run that in watch mode with hot reload.

so Can you please explain what are we trying to achieve here ?

iam-vipin avatar Aug 08 '24 19:08 iam-vipin

@VipinDevelops this issue basically meant that when you're working on a change in the CLI itself, instead of shutting down and restarting all changes, it should have a live-reload functionality similar to how you'd have experienced in the usual UI dev.

jayantbh avatar Aug 13 '24 14:08 jayantbh

Hey @jayantbh Thanks for explaining, but we already have a dev scripting in the CLI that can run it with hot reload.

Here is the Dev Script which run CLI with Watch Mode.

iam-vipin avatar Aug 14 '24 13:08 iam-vipin

@VipinDevelops does it actually work like live-reload for you? Because it seems to basically trigger a whole-app-reload for the CLI for me on changes.

jayantbh avatar Aug 14 '24 15:08 jayantbh

So @jayantbh correct me if I am wrong we want to make a feature that lets use inject updated source code into a running app without a restart

iam-vipin avatar Aug 14 '24 15:08 iam-vipin

Correct. The running app here is the CLI app. Not the frontend or backend code.

jayantbh avatar Aug 14 '24 15:08 jayantbh

Got it and that code with run other services thanks for explaining I will try to explore potential solutions for this.

iam-vipin avatar Aug 14 '24 15:08 iam-vipin