Skip to content

Minor fixes for project importer #5546

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ object BuildGenUtil {
val name = backtickWrap(testModule)
testModuleExtraType match {
case Some(supertype) => s"object $name extends $testModuleMainType with $supertype"
case None => s"trait $name extends $testModuleMainType"
case None => s"object $name extends $testModuleMainType with TestModule.Junit4"
}
}

Expand Down
4 changes: 3 additions & 1 deletion runner/meta/src/mill/meta/CodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ object CodeGen {
// resolve logic to traverse, cannot actually be evaluated and used
val lhs = backtickWrap(c)
val rhs = s"${pkgSelector2(Some(c))}.package_"
s"final lazy val $lhs: $rhs.type = $rhs // subfolder module reference"
// Leave a space between `lhs` and `:` in case `lhs` ends with a `_`, since
// without the space they would be parsed as one token and fail compilation
s"final lazy val $lhs : $rhs.type = $rhs // subfolder module reference"
}
.mkString("\n")

Expand Down
Loading