Skip to content
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

--watch doesn't work correctly with Scala .sc scripts #3177

Open
Gedochao opened this issue Sep 16, 2024 · 0 comments
Open

--watch doesn't work correctly with Scala .sc scripts #3177

Gedochao opened this issue Sep 16, 2024 · 0 comments
Labels
--watch Issues tied to watching sources bug Something isn't working scripting Issues tied to *.sc script inputs.

Comments

@Gedochao
Copy link
Contributor

Version(s)
1.5.0 / d2d308c

Describe the bug
When modifying an .sc script under --watch, the project gets re-run, but doesn't actually get rebuilt.

To Reproduce

// script.sc
println("Hello")

and then

scala-cli run . --watch

and then modify script.sc into:

// script.sc
println("Hello world")

The change triggers a re-run, but doesn't actually respect the change:

Compiling project (Scala 3.5.0, JVM (17))
Compiled project (Scala 3.5.0, JVM (17))
Hello
Program exited with return code 0.
Watching sources, press Ctrl+C to exit, or press Enter to re-run.
Hello
Program exited with return code 0.
Watching sources, press Ctrl+C to exit, or press Enter to re-run.

Expected behaviour

Compiling project (Scala 3.5.0, JVM (17))
Compiled project (Scala 3.5.0, JVM (17))
Hello
Program exited with return code 0.
Watching sources, press Ctrl+C to exit, or press Enter to re-run.
Hello world
Program exited with return code 0.
Watching sources, press Ctrl+C to exit, or press Enter to re-run.
@Gedochao Gedochao added bug Something isn't working scripting Issues tied to *.sc script inputs. --watch Issues tied to watching sources labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--watch Issues tied to watching sources bug Something isn't working scripting Issues tied to *.sc script inputs.
Projects
None yet
Development

No branches or pull requests

1 participant