Skip to content

Commit 1be73fd

Browse files
fix: Use root qualifier in Discover macro (#5055)
without this in case there is another mill package (which is often the case for [plugins](https://github.com/disneystreaming/smithy4s/blob/series/0.18/modules/mill-codegen-plugin/src/smithy4s/codegen/mill/Smithy4sModule.scala#L17)) following error occurs during macro expansion: ``` [error] [millCodegenPlugin0_12] /home/kghost/workspace/smithy4s/modules/mill-codegen-plugin/src/smithy4s/codegen/LSP.scala:30:32: object define is not a member of package smithy4s.codegen.mill [error] [millCodegenPlugin0_12] lazy val millDiscover = mill.define.Discover[this.type] [error] [millCodegenPlugin0_12] ^ [error] [millCodegenPlugin0_12] one error found [error] [millCodegenPlugin0_12] (millCodegenPlugin0_12 / Compile / compileIncremental) Compilation failed [error] Total time: 1 s, completed May 4, 2025, 12:34:05 AM ``` Co-authored-by: ghostbuster91 <[email protected]> Pull request: #5055
1 parent a3c50f2 commit 1be73fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/define/src/mill/define/Discover.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ object Discover {
152152
}
153153

154154
c.Expr[Discover](
155-
q"import mill.api.JsonFormatters._; _root_.mill.define.Discover.apply2(_root_.scala.collection.immutable.Map(..$mapping))"
155+
q"import _root_.mill.api.JsonFormatters._; _root_.mill.define.Discover.apply2(_root_.scala.collection.immutable.Map(..$mapping))"
156156
)
157157
}
158158
}

0 commit comments

Comments
 (0)