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

Update directory-watcher. #484

Merged
merged 1 commit into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ lazy val mdoc = project
"com.googlecode.java-diff-utils" % "diffutils" % "1.3.0",
"io.get-coursier" % "interface" % V.coursier,
"com.vladsch.flexmark" % "flexmark-all" % "0.62.2",
"io.methvin" % "directory-watcher" % "0.12.0",
"io.methvin" % "directory-watcher" % "0.15.0",
// live reload
"io.undertow" % "undertow-core" % "2.2.5.Final",
"org.jboss.xnio" % "xnio-nio" % "3.8.4.Final",
Expand Down
19 changes: 10 additions & 9 deletions mdoc/src/main/scala-2/mdoc/internal/cli/MainOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package mdoc.internal.cli

import com.vladsch.flexmark.parser.Parser
import io.methvin.watcher.DirectoryChangeEvent
import java.nio.file.Files
import java.nio.file.StandardCopyOption
import java.util.concurrent.Executors
import io.methvin.watcher.hashing.FileHash
import io.methvin.watcher.hashing.FileHasher
import mdoc.Reporter
import mdoc.internal.BuildInfo
import mdoc.internal.io.IO
Expand All @@ -16,16 +15,18 @@ import mdoc.internal.markdown.LinkHygiene
import mdoc.internal.markdown.Markdown
import mdoc.internal.pos.DiffUtils
import metaconfig.Configured

import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.StandardCopyOption
import java.util.concurrent.Executors
import scala.collection.concurrent.TrieMap
import scala.collection.mutable
import scala.meta.Input
import scala.meta.internal.io.FileIO
import scala.meta.internal.io.PathIO
import scala.meta.io.AbsolutePath
import scala.util.control.NonFatal
import io.methvin.watcher.hashing.FileHasher
import scala.collection.concurrent.TrieMap
import java.nio.file.Path
import io.methvin.watcher.hashing.HashCode
import scala.collection.mutable

final class MainOps(
context: Context
Expand Down Expand Up @@ -185,7 +186,7 @@ final class MainOps(
}
}

val hashes = mutable.Map.empty[Path, HashCode]
val hashes = mutable.Map.empty[Path, FileHash]
def handleWatchEvent(event: DirectoryChangeEvent): Unit = {
val path = AbsolutePath(event.path())
settings.toInputFile(path) match {
Expand Down