-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Error when using 0.11 plugin with Mill 0.12 #4390
Comments
Your description of the issue is a bit confusing. It's not clear to me how to reproduce. Can you provide steps to reproduce?
This is exactly how it works currently. Except that Mill |
No plugin should use a If your plugin only works for Mill 0.12 than of course you can depend on any newer versions. This is fine. Other plugins do that too, e.g. The next planned bump of the the Mill binary version will be Mill |
Based on the simplest project from Mill (https://mill-build.org/mill/scalalib/intro.html#_simple_scala_module), a build.mill file like: package build
import mill._, scalalib._, publish._
import $ivy.`io.chris-kipp::mill-ci-release::0.3.0`
import io.kipp.mill.ci.release.{CiReleaseModule, SonatypeHost}
trait Publish extends CiReleaseModule {
def pomSettings = PomSettings(
description = "Reproducer",
organization = "com.carlosedp",
url = "https://github.com/carlosedp/repro",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("carlosedp", "repro"),
developers = Seq(
Developer("carlosedp", "Carlos Eduardo de Paula", "https://github.com/carlosedp")
),
)
def artifactName = "repro"
override def sonatypeHost = Some(SonatypeHost.s01)
}
object foo extends ScalaModule with Publish {
def scalaVersion = "2.13.16"
def ivyDeps = Agg(
ivy"com.lihaoyi::scalatags:0.12.0",
ivy"com.lihaoyi::mainargs:0.6.2"
)
} when I run the mill-ci-release command to publish Hard-coding the version to the |
It looks like it has something to do with a change in the private constructor of the @lihaoyi, could you please have a look? |
I haven't had time to minimize or reproduce yet, but yesterday I also got the same report here for someone using my mill-dependency-submission plugin now that I allow the 0.12 version to be used in the action. So it looks like from Mill 0.12.x you can't use the published 0.11.x version of that plugin either. It looks to be the same error. |
I remember people reporting this before in one of the previous updates. Might be a similar issue |
Probably caused by #3532 , which increased the tuple size from 2 to 3. It's unfortunate that MIMA didn't catch it, I guess because it's a generic and so there's erasure. I'm also surprised that nobody has reported this sooner. Given we've released 0.12.0 -> 0.12.5 on this new code, we probably can't reasonably revert the behavior without breaking people again. So we'll probably just have to wait until the |
Can't we cat the runtime type being incompatible and convert it, if there is any reasonable conversion possible? |
Would publishing a separate version for Mill 0.12 and using that instead (as we did for mill-ci-release) be a good intermediate solution then? |
@lefou we might be able to? I think if we change the type from |
Seems like it may be due to the macro codegen generating |
It would. But Mill will not pick up the |
We have been discussing this issue at ckipp01/mill-ci-release#134 and ckipp01/mill-ci-release#143 regarding using a 0.11 plugin (which also has a 0.12 version published) but the project gets the 0.11 as default since it's supposedly binary compatible.
In this case, when using the
mill-ci-release
plugin likeimport $ivy.
io.chris-kipp::mill-ci-release::0.3.0`` on my mill-aliases plugin (which is in 0.12.5 in this branch: https://github.com/carlosedp/mill-aliases/tree/mill012), I get:The way to overcome this is to hard-code the mill 0.12 version of the plugin which makes it work:
I understand it should either work with the 0.11 version or fetch the 0.12 version in case it's available.
Maybe a workaround would be having a variable that holds the Mill binary version (which should be "0.11", "0.12", etc) that we could import like:
Or something like that.
The text was updated successfully, but these errors were encountered: