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 improvements #4096

Merged
merged 2 commits into from May 6, 2018

Conversation

Projects
None yet
3 participants
@eatkins
Copy link
Contributor

commented Apr 12, 2018

(See the guidelines for contributing, linked above)

@eed3si9n eed3si9n added the ready label Apr 12, 2018

@eatkins eatkins force-pushed the eatkins:watch-improvements branch from a08cb0c to 8ef10d7 Apr 12, 2018

@eatkins eatkins force-pushed the eatkins:watch-improvements branch 2 times, most recently from 7805887 to d3e1772 Apr 13, 2018

Ethan Atkins added some commits Apr 12, 2018

Ethan Atkins
Bump io
My next commit replaces the implementation of
Watched.executeContinuously using apis that are available only in a
pending io pull request (sbt/io#142).
Ethan Atkins
Use new EventMonitor in executeContinuously
In sbt/io#142, I add a new api for watching for
source file events. This commit updates sbt to use the new EventMonitor
based api. The EventMonitor has an anti-entropy parameter, so that
multiple events on the same file in a short window of time do not
trigger a build. I add a key to tune it.

The implementation of executeContinuously is pretty similar. The main
changes are that shouldTerminate now blocks (EventMonitor spins up a
thread to check the termination condition) and that the
EventMonitor.watch method only returns a Boolean. This is because
the event monitor contains mutable state. It does, however, have a
state() method that returns an immutable snapshot of the state.

@eatkins eatkins force-pushed the eatkins:watch-improvements branch from d3e1772 to 7543851 Apr 23, 2018

@dwijnand dwijnand modified the milestones: 1.2.0, 1.1.5 Apr 27, 2018

@eed3si9n eed3si9n merged commit 7543851 into sbt:1.1.x May 6, 2018

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
@eatkins

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2018

This PR was broken upstream. I'll have a fix up by tomorrow (along with a related io bugfix).

@eed3si9n

This comment has been minimized.

Copy link
Member

commented May 7, 2018

I combined this PR with #4145 and added d8fe09f that tracks the rename upstream.

@eed3si9n

This comment has been minimized.

Copy link
Member

commented May 8, 2018

@eatkins

(along with a related io bugfix).

Is that a show stopper? Should I hold off sbt 1.1.5?

@eatkins

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2018

Yeah. Let me make a PR now. Won't be long.

@eatkins

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2018

The bug I was referring to is arguably not show stopping, but it can make the ux annoying. It can cause the user to have to hit enter twice to exit a watched build see sbt/io#149. Sorry I didn't make the PR earlier since fixing will require publishing another io version.

@eed3si9n

This comment has been minimized.

Copy link
Member

commented May 8, 2018

ok. Thanks for following up.

@eed3si9n eed3si9n added the area/watch label Jun 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.