You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Scala 3 project with a resources folder that I don't want to be included into the jar. With the old T syntax, it was easy:
override def resources = T.sources()
As the release notes for 0.12.0 recommend to migrate to the new Task syntax, I changed the above line to:
override def resources = Task.Sources()
which does not compile due to the vararg overloads:
[build.mill-61] [error] /home/informarte/Workspaces/yuck/build.mill:30:35: ambiguous reference to overloaded definition,
[build.mill-61] [error] both macro method Sources in object Task of type (values: os.SubPath*)(implicit ctx: mill.define.Ctx): mill.define.Target[Seq[mill.api.PathRef]]
[build.mill-61] [error] and macro method Sources in object Task of type (values: mill.api.Result[os.Path]*)(implicit ctx: mill.define.Ctx): mill.define.Target[Seq[mill.api.PathRef]]
[build.mill-61] [error] match argument types () and expected result type mill.T[Seq[mill.api.PathRef]]
[build.mill-61] [error] override def resources = Task.Sources()
[build.mill-61] [error] ^
[build.mill-61] [error] one error found
I tried to work-around this issue by using an empty list:
[build.mill-61] [error] /home/informarte/Workspaces/yuck/build.mill:30:61: Sequence argument type annotation `: _*` cannot be used here:
[build.mill-61] [error] the single parameter has type os.SubPath which is not a repeated parameter type
[build.mill-61] [error] override def resources = Task.Sources(List[os.SubPath](): _*)
[build.mill-61] [error] ^
[build.mill-61] [error] one error found
This error message does not make any sense to me.
I wonder how to proceed.
Is there a way to use one of the existing Sources overloads with an empty list?
Renaming the resources folder is of course an option but what about adding a Sources() method without arguments?
The text was updated successfully, but these errors were encountered:
I have a Scala 3 project with a
resources
folder that I don't want to be included into the jar. With the oldT
syntax, it was easy:As the release notes for 0.12.0 recommend to migrate to the new
Task
syntax, I changed the above line to:which does not compile due to the vararg overloads:
I tried to work-around this issue by using an empty list:
which does not compiler either:
This error message does not make any sense to me.
I wonder how to proceed.
Is there a way to use one of the existing
Sources
overloads with an empty list?Renaming the
resources
folder is of course an option but what about adding aSources()
method without arguments?The text was updated successfully, but these errors were encountered: