-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Description
We merged support for Scala 3 in #450. The question is now: what do we do about the Scala 3-specific artifacts of scalajs-dom?
If we release a version 1.2.0 with a new artifacts for _sjs1_3
, we can create problems in the binary ecosystem:
- There can be a library A compiled against the _2.13 artifact of scalajs-dom 1.1.0
- And a library a B compiled against the _3 artifact of scalajs-dom 1.2.0
Mixing A and B in the same project will cause both scalajs-dom_2.13 v1.1.0 and scalajs-dom_3 v1.2.0 to be on the classpath. This can cause serious issues.
There are two solutions, IMO:
- Not release the _3 artifact. After all, it does not bring any actual value compared to the _2.13 artifact at the moment. Users will still have to declare their dependency on scalajs-dom using
.cross(CrossVersion.for3Use2_13)
, as they currently do. - Bump to scalajs-dom 2.0.0, clearly advertising that there is binary conflict with the previous versions of scalajs-dom.
@gzm0 Any opinion?
Anyone else?
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Daenyth commentedon Jul 14, 2021
I'd say that anything normal developers run into that advises them to use
for3Use2_13
is undesirable. Bumping the version seems fine.gzm0 commentedon Jul 14, 2021
Maybe I'm missing something here, but is anything of this specific to scala-js-dom? Feels like the argument above applies to any Scala library that is Scala 2 and 3 compatible.
sjrd commentedon Jul 14, 2021
Yes, it applies to any Scala library that
It seems most library maintainers just pretend that there is no issue. They release a _3 artifact in a minor (or even patch) release.
armanbilge commentedon Jul 14, 2021
See also: https://gist.github.com/djspiewak/b8f2b4547951442102488964bc351cf9#5-dont-rely-on-withdottycompat
sjrd commentedon Jul 14, 2021
Daniel Spiewak's advice is harsh precisely because library maintainers have been doing willy-nilly releases of _3 artifacts in random versions. His advice does not hold if we correctly acknowledge and deal with the issue.
armanbilge commentedon Jul 14, 2021
I do see your point, but as far as I can tell (in my limited experience) this is just deferring an inevitably necessary change which risks increasing downstream pain.
SethTisue commentedon Jul 14, 2021
Might as well rip the bandaid off IMO
I guess I see
for3Use2_13
as temporary, transitional, experimental stuff where as soon as it enters the picture, buyer beware.So the best thing is to make it unnecessary, one library at a time, and do it as soon as possible.
(I'm agreeing with Arman.)
sjrd commentedon Jul 14, 2021
So, apparently I am getting flagged down to death here with my controversial opinions, so I guess we'll just bump it to 2.0.0.
larsrh commentedon Jul 14, 2021
Speaking for Typelevel, nothing could be further from the truth.
Bump to 2.0.0-SNAPSHOT.
gzm0 commentedon Jul 14, 2021
Huh? That is not how I interpret #451 (comment). From the link:
The way I understand this: 2.13 -> 3 is no different than 2.12 -> 2.13. So simply publish
_3
for the first version you support it and be done.FWIW: It seems that bumping to 2.0.0 only improves the situation you describe marginally: The dependency resolver will flag it, but it will still not work.
Another way of looking at this, isn't really the library that introduces a
_2.13
/_3
dependency (without appropriate flagging, I do not know how the whole dotty compatibility system works) the culprit?sjrd commentedon Jul 14, 2021
It's different because using 2.12 from 2.13 simply never worked, never works and will never work. However, it is perfectly possible to use 2.13 from 3 and conversely.
Yes, clearly. It's a major version bump to make it clear that it will not work. It doesn't solve anything.
Only if we say that publishing anything that uses
for3Use2_13
orfor2_13Use3
is a reason for a library to be blamed. If we allow libraries to be published like that, then it was in its right to do so.It's possible that the consensus among maintainers was that publishing such a library is bad. If that is the case, then we can start publishing for _3 in a minor version, clearly.
SethTisue commentedon Jul 14, 2021
Well, we still love you anyway :-)
Perhaps we can re-conceive/re-market “willy-nilly” as, rather, “freedom” 🇺🇸 and/or “diversity” 🏳️🌈
28 remaining items
lihaoyi commentedon Aug 2, 2021
That does sound like a reasonable plan
I like the cleanup for the dom.raw/dom.experimental/dom.ext stuff. Some of that code made sense to me 7 years ago, but it definitely wouldn't pass review for code written today.
sjrd commentedon Aug 6, 2021
Here is a first wave of cleanups: #458. Feel free to review it.
For those who would like to become maintainers, please say so and take a stab at reviewing the PR. Perhaps @armanbilge @japgolly ?
armanbilge commentedon Aug 6, 2021
Thanks @sjrd. I think that I'm too new to Scala.js to be qualified to be a maintainer, but I am eager to help out. I think @japgolly is a great candidate if he has the bandwidth available :)
japgolly commentedon Aug 8, 2021
Thanks @armanbilge . Yeah I don't really have the bandwidth but I keep signing up for things somehow so I'll do my best :) @sjrd np, send me an invite and I'll review and merge.
Also if anyone else can join me as a maintainer I'd really appreciate it. Good to both share the burden and provide different perspectives.
armanbilge commentedon Aug 8, 2021
@japgolly If you'll have me, I can be a deputy maintainer 😆
japgolly commentedon Aug 8, 2021
@armanbilge Thank you and it'd be my pleasure! We're all in this together 😄
armanbilge commentedon Aug 8, 2021
Also maybe @raquo? It seems they have an important stake in the library as well.
sjrd commentedon Aug 8, 2021
@japgolly
@armanbilge
Invitations sent.
aappddeevv commentedon Aug 12, 2021
I know this is closed now, but @japgolly and @armanbilge if you find that you are unable to get lift off on this, please reach out to me.
armanbilge commentedon Aug 12, 2021
@aappddeevv thanks for the offer!! If you have a moment to review PRs and/or create PRs to address any "help wanted" issue that would be much appreciated! :)