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

Allow watch mode with the sbt task to run in the background #737

Open
steinybot opened this issue Jan 11, 2023 · 0 comments · May be fixed by #738
Open

Allow watch mode with the sbt task to run in the background #737

steinybot opened this issue Jan 11, 2023 · 0 comments · May be fixed by #738

Comments

@steinybot
Copy link

I once asked for watch to be removed from the sbt plugin however I have actually been trying to make use of it but without much luck.

In order to make it useful I am trying to run mdoc.SbtMain using bgRunTask so that it runs in the background but it still eats (most of) the input and stops whenever enter is pressed so it's not possible to run other sbt tasks or commands while it is running.

Something like:

  (Compile / bgRunMain).toTask(s" mdoc.SbtMain --watch")

I tried forking but I think that causes it to stop straight away, presumably because the input stream is closed.

I have reproduced it in this scripted test.

Would it be possible to not wait for enter but instead use the JobHandle that sbt uses for background tasks (e.g. bgStop 1)?

This was referenced Jan 11, 2023
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 a pull request may close this issue.

1 participant