onUnknownEvent in trait Monitor of type (event: java.nio.file.WatchEvent[_])Unit is not defined
Closed this issue · 6 comments
rogertangcn commented
The cause of the problem is because in Better files, File.Monitor.onUnknownEvent()
method has removed count
parameter in this commit.
gmethvin commented
Interesting. I thought better-files followed semver so I'm surprised they broke this in 3.4.0. The new API makes more sense though. The fix here is just to update to the latest better-files and update our code to conform to the new interface.
@rogertangcn interested in submitting a pull request?
rogertangcn commented
Tried to push my branch up, was told i don't have permission to do so. (sorry, my first time pushing up code to github repo of someone else.)
gmethvin commented
Great, thanks!
gmethvin commented
Pretty sure all that's required is:
- Change https://github.com/gmethvin/directory-watcher/blob/master/better-files/src/main/scala/io/methvin/better/files/RecursiveFileMonitor.scala#L63 to remove the count parameter.
- Stop passing count at https://github.com/gmethvin/directory-watcher/blob/master/better-files/src/main/scala/io/methvin/better/files/RecursiveFileMonitor.scala#L34 (better-files considers overflow an "unknown" event).
- Upgrade better-files at https://github.com/gmethvin/directory-watcher/blob/master/build.sbt#L40 to whatever the latest version is.
gmethvin commented
This is fixed in version 0.5.0