Skip to content

Commit

Permalink
Avoid spurious deprecation warnings in generated code (#3379)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lihaoyi authored Aug 18, 2024
1 parent b3b2999 commit 7a515fb
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 @@ -368,6 +368,7 @@ object MillBuildRootModule {
|import _root_.mill.runner.MillBuildRootModule
|$imports
|
|@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 7a515fb

Please # to comment.