Skip to content

Commit

Permalink
Use hashCode of the Agg[PathRef] instead of the hashCode of the Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab committed Dec 10, 2022
1 parent de64a43 commit 8a32ac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scalajslib/src/mill/scalajslib/worker/ScalaJSWorker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private[scalajslib] class ScalaJSWorker extends AutoCloseable {
private def bridge(toolsClasspath: Agg[mill.PathRef])(implicit ctx: Ctx.Home) = {
// toolsClasspath is stable and made of external libraries which have the versions
// in the file names. So we use the paths string to hash since it's ~50x faster
val classloaderSig = toolsClasspath.iterator.map(p => p.path.hashCode).sum
val classloaderSig = toolsClasspath.hashCode
scalaJSWorkerInstanceCache match {
case Some((sig, bridge)) if sig == classloaderSig => bridge
case _ =>
Expand Down

0 comments on commit 8a32ac7

Please sign in to comment.