Skip to content

Commit

Permalink
Avoid spurious deprecation warnings in generated code (Backport #3379) (
Browse files Browse the repository at this point in the history
#3400)

Fixes #3371

The direct problem is that we are generating code with resolved type
aliases, resulting in the `JavaTests` aliases being resolved to
deprecated `JavaModuleTests` traits. However, in general generated code
should probably not display warnings at all, so better to just slap
`@nowarn` on the whole chunk rather than trying to fix the immediate
alias resolution problem

Pull Request: #3400

Co-authored-by: Li Haoyi <haoyi.sg@gmail.com>
  • Loading branch information
lolgab and lihaoyi authored Aug 20, 2024
1 parent a710aaa commit e79b06f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runner/src/mill/runner/MillBuildRootModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ object MillBuildRootModule {
|
|import _root_.mill.runner.MillBuildRootModule
|
|@scala.annotation.nowarn
|object ${backtickWrap(miscInfoName)} {
| implicit lazy val millBuildRootModuleInfo: _root_.mill.runner.MillBuildRootModule.Info = _root_.mill.runner.MillBuildRootModule.Info(
| ${enclosingClasspath.map(p => literalize(p.toString))}.map(_root_.os.Path(_)),
Expand Down

0 comments on commit e79b06f

Please # to comment.