-
Notifications
You must be signed in to change notification settings - Fork 153
feat: add --watch-clear-screen option to clear terminal on rebuild #4031
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
base: main
Are you sure you want to change the base?
feat: add --watch-clear-screen option to clear terminal on rebuild #4031
Conversation
|
|
||
| val shouldBuildTestScope = options.shared.scope.test.getOrElse(false) | ||
| if (options.watch.watchMode) { | ||
| var isFirstRun = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var isFirstRun = true | |
| val isFirstRun = new AtomicBoolean(true) |
Could be considered a nitpick, but this feels more future-proof.
Gedochao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing! I left some comments.
As noted above, we need tests for this.
Also, make sure to regenerate reference docs, since you're adding a new command line option. Refer to https://github.com/VirtusLab/scala-cli/blob/main/CONTRIBUTING.md#rules-for-a-well-formed-pr
| val withTestScope = options.shared.scope.test.getOrElse(false) | ||
| if options.watch.watchMode then { | ||
| var expectedModifyEpochSecondOpt = Option.empty[Long] | ||
| var isFirstRun = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var isFirstRun = true | |
| val isFirstRun = new AtomicBoolean(true) |
| } | ||
| } | ||
| else if (options.sharedRepl.watch.watchMode) { | ||
| var isFirstRun = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var isFirstRun = true | |
| val isFirstRun = new AtomicBoolean(true) |
| */ | ||
| val mainThreadOpt = AtomicReference(Option.empty[Thread]) | ||
|
|
||
| var isFirstRun = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var isFirstRun = true | |
| val isFirstRun = new AtomicBoolean(true) |
| restart: Boolean = false | ||
| restart: Boolean = false, | ||
| @Group(HelpGroup.Watch.toString) | ||
| @HelpMessage("Clear the screen each time the watch mode detects changes and re-compiles or re-runs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @HelpMessage("Clear the screen each time the watch mode detects changes and re-compiles or re-runs") | |
| @HelpMessage("Clear the screen each time watch mode detects changes and re-compiles or re-runs") |
| @Group(HelpGroup.Watch.toString) | ||
| @HelpMessage("Clear the screen each time the watch mode detects changes and re-compiles or re-runs") | ||
| @Tag(tags.implementation) | ||
| @Name("watch-cls") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Name("watch-cls") | |
| @Name("watchCls") | |
| @Name("watchClear") |
|
@Gedochao |
|
@krrish175-byte I'll try to take a look and review in the next couple of days, but I can already see it's failing formatting (need to run |
c461b0d to
f8e80db
Compare
Closing issue
closes #4029