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

Pass auxiliary class files to zinc so they are deleted together #3072

Merged
merged 13 commits into from
Mar 11, 2024
Merged
2 changes: 1 addition & 1 deletion scalajslib/src/mill/scalajslib/ScalaJSModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ trait ScalaJSModule extends scalalib.ScalaModule { outer =>
))
}

override protected def auxiliaryClassFileExtensions: T[Seq[String]] =
override def auxiliaryClassFileExtensions: T[Seq[String]] =
super.auxiliaryClassFileExtensions() :+ "sjsir"

}
Expand Down
5 changes: 5 additions & 0 deletions scalalib/src/mill/scalalib/JavaModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,11 @@ trait JavaModule

def forkWorkingDir: T[Path] = T { T.workspace }

/**
* Files extensions that need to be managed by Zinc together with class files
lolgab marked this conversation as resolved.
Show resolved Hide resolved
*/
def auxiliaryClassFileExtensions: T[Seq[String]] = T { Seq.empty[String] }
lefou marked this conversation as resolved.
Show resolved Hide resolved

/**
* @param all If `true` fetches also source dependencies
*/
Expand Down
5 changes: 1 addition & 4 deletions scalalib/src/mill/scalalib/ScalaModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,7 @@ trait ScalaModule extends JavaModule with TestModule.ScalaModuleBase { outer =>
else ZincWorkerUtil.scalaBinaryVersion(scalaVersion())
}

/**
* Files extensions that need to be managed by Zinc together with class files
*/
protected def auxiliaryClassFileExtensions: T[Seq[String]] = T {
override def auxiliaryClassFileExtensions: T[Seq[String]] = T {
if (ZincWorkerUtil.isScala3(scalaVersion())) Seq("tasty")
else Seq.empty[String]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ trait ScalaNativeModule extends ScalaModule { outer =>
}
}

override protected def auxiliaryClassFileExtensions: T[Seq[String]] =
override def auxiliaryClassFileExtensions: T[Seq[String]] =
super.auxiliaryClassFileExtensions() :+ "nir"

}
Expand Down
Loading