Open Quafadas opened 1 month ago
Dependencies to Mill itself should be specified with Provided
scope. I think they are currently in the default Compile
scope.
Also, depending on Mill 0.11.7
instead of 0.11.0
will effectively force all users of the smithy plugin to also use at least that version. Personally, I'd prefer to support as much versions as possible (meaning, it should compile against 0.11.0
) but if not, there should be some documentation what the minimal required Mill version is.
Good points. I don't think anything prevents us from locking the dependency on 0.11.0. And the lack of % Provided scope is totally a mis-hap.
@Quafadas, wanna have a go at PR-ing those changes ? Dependencies are defined here and used here : https://github.com/disneystreaming/smithy4s/blob/f6695280e44d269ade08adf7aa2887eecbbac08e/build.sbt#L511-L514
main
, mainApi
and scalalib
should be labeled as Provided
in the main scope of the project, but not in the test scope. I can't recall what the easiest way to do that is, in SBT
Dependencies to Mill itself should be specified with
Provided
scope.
What's the benefit of that over using the compile scope? I understand the point about pinning to the lowest version necessary, but this part I'm not sure about.
Dependencies to Mill itself should be specified with
Provided
scope.What's the benefit of that over using the compile scope? I understand the point about pinning to the lowest version necessary, but this part I'm not sure about.
It's to avoid to transitively bring in duplicate or incompatible Mill artifacts into the classpath. This is a somewhat historical recommendation, since when Mill was based on Ammonite, we couldn't fine-control the classpath plugins add. With newer Mill versions, this is a bit relaxed but still an issue. But I just recently tried to mitigate the issue completely (https://github.com/com-lihaoyi/mill/pull/3189), but this will only apply to upcomming Mill versions greater equal 0.11.8
.
I've published a teeny tiny repository here.
https://github.com/Quafadas/Smithy4sPluginCheck.git
It's pretty much a copy paste of the mill plugin docs.
With mill 0.11.7, I get success.
With mill 0.11.7-107-9ec9bc, I get this...
I noticed this in another project, where the error apparently manifests differently. I'm not clear if it's helpful to post that, as I think this is the "minimal" version.
On advice from discord, I also got out the class path. https://discord.com/channels/632150470000902164/940067748103487558/1244294323873251460
mill --meta-level 1 show compileClasspath
In case it helps ...
There are some odd references, to mill 0.10.9? If that observation has any meaning here...