com-lihaoyi / scalatags

ScalaTags is a small XML/HTML construction library for Scala.
https://com-lihaoyi.github.io/scalatags/
MIT License
757 stars 117 forks source link

fix: mima issues in build definition #241

Closed ckipp01 closed 2 years ago

ckipp01 commented 2 years ago

There were two Mima issues that popped up after https://github.com/com-lihaoyi/scalatags/commit/1724d9b4f219088103b69e43ff3445f7f2f4633d

  1. ~It looks like we were hitting on lightbend/mima#693 which has been fixed, but not released yet. Therefore I bumped down to 3.1.0 to make Mima happy for now. After the next release we can update Mima and then update the Scala version as well.~
  2. There is no scalatags_native0.4_3 published yet, ~so the easiest fix for now was to just remove Mima from the native stuff. If there is a cleaner way to do this, let me know.~ So this removes the Mima check from the native and Scala 3 combo.

EDIT: Just turn of Mima for Scala 3 for now.

lolgab commented 2 years ago

@ckipp01 Thanks for this :) You can disable MiMa for Scala Native / Scala 3 by overriding mimaPreviousArtifacts. You can apply this patch (sorry the .txt extension but Github doesn't allow .patch): mima.txt

ckipp01 commented 2 years ago

@ckipp01 Thanks for this :) You can disable MiMa for Scala Native / Scala 3 by overriding mimaPreviousArtifacts. You can apply this patch (sorry the .txt extension but Github doesn't allow .patch): mima.txt

ahhhh interesting ok. ha, I tried this before but instead of using Agg.empty[Dep] I tried just T { Seq.empty[String] }. TIL. Thanks.

ckipp01 commented 2 years ago

So we're in a bit of a pickle here. If we bump over 3.1.0 then we end up with Mima issues related to https://github.com/lightbend/mima/issues/693 which has been fixed, but not released. However, if we stick on 3.1.0 then we have issues with the newer Scala Natives https://github.com/scala-native/scala-native/issues/2503. I'm not 100% sure how to proceed here.

  1. We can turn Mima off for all Scala 3 artifacts and jump bump all the things
  2. Move back down to a version of Scala Native that doesn't have this issue, but then there are compilation issues with the latest Scala 2.12 for example with Native, so we'd need to downgrade that as well
  3. Try to use the workaround listed, but I'm unsure how to do this will mill. Is there an idiomatic way to just remove any scalacOptions that start with -plugin during scalatags.native[3.1.0,0.4.5].docJar?
  4. Just let this sit until a new Mima release is out, and then we can bump up to the newest Scala 3.1.x and call it a day

Any preferences or thoughts?

lolgab commented 2 years ago

I would go for 1.. Just move the setting I suggested from object native to trait ScalatagsPublishModule and bump all the things :)

ckipp01 commented 2 years ago

Alright, finally have it all 🟢 .

lolgab commented 2 years ago

LGTM 👌 Thank you 🙂