Skip to content

Conversation

@quartztz
Copy link
Contributor

@quartztz quartztz commented Jul 7, 2025

The current joint behavior of the --watch and --json options is such that, on file change, only the terminal view is updated, and the json report is produced once the job is killed.

In a larger project of developing a Stainless VSCode extension, this PR adds --watch-json, an option to be run in tandem with --watch that enables report outputs on file change. The addition is minimal (2 files changed), and has been tested to work.

To test this PR, run sbt universal:stage in the project root, then use the executable of your choosing (I tested with stainless-dotty) as follows:

$ frontends/dotty/target/universal/stage/bin/stainless-dotty --watch-json --watch path/to/your/file.scala

then edit the file, save its contents, and verify that the contents of the generated report.json file match the state of the file.

@vkuncak
Copy link
Collaborator

vkuncak commented Sep 10, 2025

@quartztz this sounds like a cool useful change! We have a small tutorial doc update coming up, but could you rebase the PR right after that and we will merge it?

@quartztz
Copy link
Contributor Author

That sounds great! I'll get to that as soon as the doc update is up and running.

@sankalpgambhir
Copy link
Member

sankalpgambhir commented Sep 15, 2025 via email

@quartztz
Copy link
Contributor Author

That'll teach me to read comment dates. Getting to it asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants