Closed havocp closed 10 years ago
Yeah, so there's a big missing piece here:
==
is ok)?, and then we send the notification if the cache doesn't match the currently cached valueI was going to suggest that caching the values is involved in the solution but we have talked about a separate layer around SbtClient which does caching/observables right?
I think I can add "Unlisten" requests quickly with no structural changes so I might do that first.
I do think we need a way to watch without scheduling the task. I think Activator will want to know latest results whenever they exist, but we don't always want to launch a compile and test on startup. My suggestion here is to just separate watching and "notify current value" on the protocol level (two separate requests) and then manage it on the client API level (client has some API/logic to decide when to ask for current value notification). I can make an initial patch that keeps current behavior but with two requests and then we can start evolving the client.
Right now for me this is just a big yak shave to make it easier to finish my "execution requests and events" integration test....
I think this is all fixed, forgot to close it.
Writing an integration test I tried to use the
SbtClient.watch()
API and I think there are some problems to solve. Haven't worked out all solutions yet. Just opening this issue as a place to discuss, I can work on a patch next week.None of these should be a big deal to fix, I think for the first two we'd maybe add a flag for "give me an immediate notification" which would then always or never give an immediate notification - or alternatively, we could never give immediate notification and provide a separate method/request which would force a notification. Not sure exactly. Anyone with an opinion let me know...