You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The --watch switch in CLI is intended for progressive script compilation and works well for that case. This feature is very useful while developing a long-running server side script as well.
However, it behaves unexpected when executing a long-running script, like with lsc -w myscript.ls. That starts just another instance before killing previous instance.
Expected
lsc -w should kill previous instance (if exists) and then start the new process.
FYI, there's no child process involved. lsc evaluates your code in its own process. If you want this behavior, you can modify your own script to cancel any scheduled work whenever the top level runs again, as long as you store the necessary IDs or callbacks on the global object and not just in a variable.
The
--watch
switch in CLI is intended for progressive script compilation and works well for that case. This feature is very useful while developing a long-running server side script as well.However, it behaves unexpected when executing a long-running script, like with
lsc -w myscript.ls
. That starts just another instance before killing previous instance.Expected
lsc -w
should kill previous instance (if exists) and then start the new process.Test case
Output is:
The text was updated successfully, but these errors were encountered: