Skip to content
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

Mill plugin (apparently) doesn't work on mill snapshot #1544

Open
Quafadas opened this issue May 26, 2024 · 4 comments · May be fixed by #1552
Open

Mill plugin (apparently) doesn't work on mill snapshot #1544

Quafadas opened this issue May 26, 2024 · 4 comments · May be fixed by #1552

Comments

@Quafadas
Copy link

Quafadas commented May 26, 2024

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...

Configured version is 0.11.7-107-9ec9bc (/Users/simon/Code/viteless/Smithy4sPluginCheck/.mill-version)
[build.sc] [49/53] compile 
[info] compiling 1 Scala source to /Users/simon/Code/viteless/Smithy4sPluginCheck/out/mill-build/compile.dest/classes ...
[info] done compiling
[41/63] shared.smithy4sCodegen 
May 26, 2024 8:23:39 PM software.amazon.smithy.openapi.fromsmithy.mappers.RemoveUnusedComponents removalRound
INFO: Removing unused OpenAPI components: [#/components/schemas/Person, #/components/schemas/GreetInput, #/components/schemas/Greeting, #/components/schemas/GreetOutput]
May 26, 2024 8:23:40 PM software.amazon.smithy.openapi.fromsmithy.mappers.RemoveUnusedComponents removalRound
INFO: Removing unused OpenAPI components: [#/components/schemas/TodoDeleted, #/components/schemas/NewTodo, #/components/schemas/Todos, #/components/schemas/TodoInput]
[63/63] shared.compile 
[info] compiling 16 Scala sources to /Users/simon/Code/viteless/Smithy4sPluginCheck/out/shared/compile.dest/classes ...
[info] done compiling
simon@Simons-Mac-mini Smithy4sPluginCheck % ./millw shared.compile
[build.sc] [53/58] compile 
[info] compiling 1 Scala source to /Users/simon/Code/viteless/Smithy4sPluginCheck/out/mill-build/compile.dest/classes ...
[info] done compiling
[build.sc] [58/58] methodCodeHashSignatures 
java.lang.AbstractMethodError: Receiver class millbuild.build$shared$ does not define or inherit an implementation of the resolved method 'abstract mill.define.ModuleRef mill$scalalib$JavaModule$$super$zincWorker()' of interface mill.scalalib.JavaModule.
    mill.scalalib.JavaModule.zincWorker(JavaModule.scala:38)
    mill.scalalib.JavaModule.zincWorker$(JavaModule.scala:38)
    millbuild.build$shared$.zincWorker(build.sc:37)
    mill.scalalib.ScalaModule.$anonfun$compile$1(ScalaModule.scala:287)
    scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:469)
    mill.moduledefs.Cacher.cachedTarget(Cacher.scala:10)
    mill.moduledefs.Cacher.cachedTarget$(Cacher.scala:9)
    mill.define.Module$BaseClass.cachedTarget(Module.scala:58)
    mill.scalalib.ScalaModule.compile(ScalaModule.scala:280)
    mill.scalalib.ScalaModule.compile$(ScalaModule.scala:280)
    millbuild.build$shared$.compile(build.sc:37)
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    java.base/java.lang.reflect.Method.invoke(Method.java:580)
    mill.resolve.Resolve$.$anonfun$instantiateTarget$2(Resolve.scala:96)

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...

simon@Simons-Mac-mini Smithy4sPluginCheck % ./millw --meta-level 1 show compileClasspath
[build.sc] [1/1] show > [16/20] enclosingClasspath 
[
  "qref:v1:8e415a2d:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy4s/smithy4s-mill-codegen-plugin_mill0.11_2.13/0.18.20/smithy4s-mill-codegen-plugin_mill0.11_2.13-0.18.20.jar",
  "qref:v1:647bb4c6:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-moduledefs_2.13/0.10.9/mill-moduledefs_2.13-0.10.9.jar",
  "qref:v1:472d5ac4:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.14/scala-library-2.13.14.jar",
  "qref:v1:15a9696a:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy4s/smithy4s-codegen_2.13/0.18.20/smithy4s-codegen_2.13-0.18.20.jar",
  "qref:v1:6dbb10d5:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-main_2.13/0.11.7/mill-main_2.13-0.11.7.jar",
  "qref:v1:1d2d0ca4:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-main-api_2.13/0.11.7/mill-main-api_2.13-0.11.7.jar",
  "qref:v1:730f5dae:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-scalalib_2.13/0.11.7/mill-scalalib_2.13-0.11.7.jar",
  "qref:v1:ec6c4a5c:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.13.14/scala-compiler-2.13.14.jar",
  "qref:v1:589290b0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/sourcecode_2.13/0.3.0/sourcecode_2.13-0.3.0.jar",
  "qref:v1:c606be9c:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy4s/smithy4s-protocol/0.18.20/smithy4s-protocol-0.18.20.jar",
  "qref:v1:61d4acb5:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.10.0/cats-core_2.13-2.10.0.jar",
  "qref:v1:2ff81ea9:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-model/1.49.0/smithy-model-1.49.0.jar",
  "qref:v1:d33fd0f0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-build/1.49.0/smithy-build-1.49.0.jar",
  "qref:v1:e433ecc7:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/alloy/alloy-core/0.3.8/alloy-core-0.3.8.jar",
  "qref:v1:2d21698d:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/alloy/alloy-openapi_2.13/0.3.8/alloy-openapi_2.13-0.3.8.jar",
  "qref:v1:a36a647d:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/smithytranslate-proto_2.13/0.5.2/smithytranslate-proto_2.13-0.5.2.jar",
  "qref:v1:fb741de5:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/os-lib_2.13/0.9.3/os-lib_2.13-0.9.3.jar",
  "qref:v1:b93f02f1:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-core_2.13/0.14.6/circe-core_2.13-0.14.6.jar",
  "qref:v1:006f2988:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-parser_2.13/0.14.6/circe-parser_2.13-0.14.6.jar",
  "qref:v1:8f35b107:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-generic_2.13/0.14.6/circe-generic_2.13-0.14.6.jar",
  "qref:v1:d297be3b:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-collection-compat_2.13/2.12.0/scala-collection-compat_2.13-2.12.0.jar",
  "qref:v1:d0c019f0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.13.14/scala-reflect-2.13.14.jar",
  "qref:v1:132321c0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/coursier_2.13/2.1.9/coursier_2.13-2.1.9.jar",
  "qref:v1:0d23d9b0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/windows-ansi/windows-ansi/0.0.5/windows-ansi-0.0.5.jar",
  "qref:v1:da2ec6ac:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mainargs_2.13/0.6.1/mainargs_2.13-0.6.1.jar",
  "qref:v1:3b39aaef:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/interface/1.0.19/interface-1.0.19.jar",
  "qref:v1:457f7481:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/requests_2.13/0.8.0/requests_2.13-0.8.0.jar",
  "qref:v1:8443ab82:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-main-eval_2.13/0.11.7/mill-main-eval_2.13-0.11.7.jar",
  "qref:v1:5eabf9d5:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-main-resolve_2.13/0.11.7/mill-main-resolve_2.13-0.11.7.jar",
  "qref:v1:b60b73e6:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-main-client/0.11.7/mill-main-client-0.11.7.jar",
  "qref:v1:03d57621:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/upickle_2.13/3.1.4/upickle_2.13-3.1.4.jar",
  "qref:v1:e78081cc:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/pprint_2.13/0.8.1/pprint_2.13-0.8.1.jar",
  "qref:v1:4d6ef644:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/fansi_2.13/0.4.0/fansi_2.13-0.4.0.jar",
  "qref:v1:9ca2e086:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar",
  "qref:v1:b577fc7b:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scalameta/scalafmt-dynamic_2.13/3.7.15/scalafmt-dynamic_2.13-3.7.15.jar",
  "qref:v1:5a77bcfc:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-scalalib-api_2.13/0.11.7/mill-scalalib-api_2.13-0.11.7.jar",
  "qref:v1:04e0388c:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-testrunner_2.13/0.11.7/mill-testrunner_2.13-0.11.7.jar",
  "qref:v1:c3fede0e:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/java-diff-utils/java-diff-utils/4.12/java-diff-utils-4.12.jar",
  "qref:v1:aa1d7c9b:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jline/jline/3.25.1/jline-3.25.1.jar",
  "qref:v1:93dd03ee:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/net/java/dev/jna/jna/5.14.0/jna-5.14.0.jar",
  "qref:v1:b19a48e2:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-kernel_2.13/2.10.0/cats-kernel_2.13-2.10.0.jar",
  "qref:v1:77b919e1:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-utils/1.49.0/smithy-utils-1.49.0.jar",
  "qref:v1:086cff59:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-openapi/1.48.0/smithy-openapi-1.48.0.jar",
  "qref:v1:5a5882ac:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/smithytranslate-traits/0.5.2/smithytranslate-traits-0.5.2.jar",
  "qref:v1:b089db96:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/smithytranslate-transitive_2.13/0.5.2/smithytranslate-transitive_2.13-0.5.2.jar",
  "qref:v1:0f4c6008:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/geny_2.13/1.0.0/geny_2.13-1.0.0.jar",
  "qref:v1:d71ccf31:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-numbers_2.13/0.14.6/circe-numbers_2.13-0.14.6.jar",
  "qref:v1:1fe3ef99:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-jawn_2.13/0.14.6/circe-jawn_2.13-0.14.6.jar",
  "qref:v1:99aa410b:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/chuusai/shapeless_2.13/2.3.10/shapeless_2.13-2.3.10.jar",
  "qref:v1:001f91e3:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-core_2.13/2.13.5.2/jsoniter-scala-core_2.13-2.13.5.2.jar",
  "qref:v1:af5789b0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/coursier-core_2.13/2.1.9/coursier-core_2.13-2.1.9.jar",
  "qref:v1:e8ecd7fd:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/coursier-cache_2.13/2.1.9/coursier-cache_2.13-2.1.9.jar",
  "qref:v1:8996d391:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/coursier-proxy-setup/2.1.9/coursier-proxy-setup-2.1.9.jar",
  "qref:v1:6cc36184:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.18/jansi-1.18.jar",
  "qref:v1:9a88caca:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar",
  "qref:v1:65d7055d:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-main-define_2.13/0.11.7/mill-main-define_2.13-0.11.7.jar",
  "qref:v1:a28114b6:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/ujson_2.13/3.1.4/ujson_2.13-3.1.4.jar",
  "qref:v1:973656d0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/upack_2.13/3.1.4/upack_2.13-3.1.4.jar",
  "qref:v1:51ef9286:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/upickle-implicits_2.13/3.1.4/upickle-implicits_2.13-3.1.4.jar",
  "qref:v1:b8781155:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scalameta/scalafmt-interfaces/3.7.15/scalafmt-interfaces-3.7.15.jar",
  "qref:v1:98923059:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/typesafe/config/1.4.2/config-1.4.2.jar",
  "qref:v1:69c38d3b:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-main-util_2.13/0.11.7/mill-main-util_2.13-0.11.7.jar",
  "qref:v1:4028acf5:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-testrunner-entrypoint/0.11.7/mill-testrunner-entrypoint-0.11.7.jar",
  "qref:v1:b55e62cd:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-jsonschema/1.48.0/smithy-jsonschema-1.48.0.jar",
  "qref:v1:dd4ef3c9:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-aws-traits/1.48.0/smithy-aws-traits-1.48.0.jar",
  "qref:v1:2bb39ff9:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-openapi-traits/1.48.0/smithy-openapi-traits-1.48.0.jar",
  "qref:v1:760060df:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/jawn-parser_2.13/1.4.0/jawn-parser_2.13-1.4.0.jar",
  "qref:v1:64f5d927:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/concurrent-reference-hash-map/1.1.0/concurrent-reference-hash-map-1.1.0.jar",
  "qref:v1:51a156e2:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.13/2.2.0/scala-xml_2.13-2.2.0.jar",
  "qref:v1:0ba03ee9:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/coursier-util_2.13/2.1.9/coursier-util_2.13-2.1.9.jar",
  "qref:v1:b1167082:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/jniutils/windows-jni-utils/0.3.3/windows-jni-utils-0.3.3.jar",
  "qref:v1:c7f401b0:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/4.9.0/plexus-archiver-4.9.0.jar",
  "qref:v1:6e9c9c12:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/2.1.1/plexus-container-default-2.1.1.jar",
  "qref:v1:87dc3814:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/virtuslab/scala-cli/config_2.13/0.2.1/config_2.13-0.2.1.jar",
  "qref:v1:f2034f12:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.14.0/jna-platform-5.14.0.jar",
  "qref:v1:d99fc5fa:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/jarjarabrams/jarjar-abrams-core_2.13/1.9.0/jarjar-abrams-core_2.13-1.9.0.jar",
  "qref:v1:432c531e:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/scalaparse_2.13/3.0.2/scalaparse_2.13-3.0.2.jar",
  "qref:v1:7258c5f9:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/kohlschutter/junixsocket/junixsocket-native-common/2.8.3/junixsocket-native-common-2.8.3.jar",
  "qref:v1:fb14d85c:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/kohlschutter/junixsocket/junixsocket-common/2.8.3/junixsocket-common-2.8.3.jar",
  "qref:v1:89cd8b7b:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/upickle-core_2.13/3.1.4/upickle-core_2.13-3.1.4.jar",
  "qref:v1:ff4e3604:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/software/amazon/smithy/smithy-diff/1.48.0/smithy-diff-1.48.0.jar",
  "qref:v1:bdf40ecc:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1.jar",
  "qref:v1:271fa741:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/4.0.0/plexus-utils-4.0.0.jar",
  "qref:v1:81056b20:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/codehaus/plexus/plexus-io/3.4.1/plexus-io-3.4.1.jar",
  "qref:v1:5eefc294:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/commons-io/commons-io/2.15.0/commons-io-2.15.0.jar",
  "qref:v1:0e71c500:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/commons/commons-compress/1.24.0/commons-compress-1.24.0.jar",
  "qref:v1:77a9e1af:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/iq80/snappy/snappy/0.4/snappy-0.4.jar",
  "qref:v1:e87cf8cf:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/tukaani/xz/1.9/xz-1.9.jar",
  "qref:v1:24a4f117:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/luben/zstd-jni/1.5.5-10/zstd-jni-1.5.5-10.jar",
  "qref:v1:307e573e:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/codehaus/plexus/plexus-classworlds/2.6.0/plexus-classworlds-2.6.0.jar",
  "qref:v1:02881b91:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/xbean/xbean-reflect/3.7/xbean-reflect-3.7.jar",
  "qref:v1:8375b141:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/jarjar/jarjar/1.9.0/jarjar-1.9.0.jar",
  "qref:v1:4f723aa8:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/fastparse_2.13/3.0.2/fastparse_2.13-3.0.2.jar",
  "qref:v1:727a7794:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm/9.5/asm-9.5.jar",
  "qref:v1:d02cfeac:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar",
  "qref:v1:17a3e014:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar",
  "qref:v1:bcffcc9d:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar",
  "ref:v0:c984eca8:/Users/simon/Code/viteless/Smithy4sPluginCheck/mill-build/compile-resources",
  "qref:v0:52f4a499:/Users/simon/Code/viteless/Smithy4sPluginCheck/out/mill-launcher/0.11.7-107-9ec9bc.jar",
  "qref:v1:fbac15c7:/Users/simon/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/mill-runner-linenumbers_2.13/0.11.7-107-9ec9bc/mill-runner-linenumbers_2.13-0.11.7-107-9ec9bc.jar"
]
@lefou
Copy link

lefou commented May 26, 2024

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.

@Baccata
Copy link
Contributor

Baccata commented May 27, 2024

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 :

smithy4s/build.sbt

Lines 511 to 514 in f669528

Dependencies.Mill.main,
Dependencies.Mill.mainApi,
Dependencies.Mill.scalalib,
Dependencies.Mill.mainTestkit

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

@Quafadas Quafadas linked a pull request May 29, 2024 that will close this issue
7 tasks
@kubukoz
Copy link
Member

kubukoz commented May 29, 2024

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.

@lefou
Copy link

lefou commented May 29, 2024

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 (com-lihaoyi/mill#3189), but this will only apply to upcomming Mill versions greater equal 0.11.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants