-
Notifications
You must be signed in to change notification settings - Fork 118
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
Versioning #327
Comments
Huge plus one 👍 |
👍 in general - although I don' understand this part (not sure why it matters):
|
👍 . Lets keep differences explicit and don't get trapped by JVM dependencies resolution. |
The scala2 & scala3 flavors need to have different coordinates in maven. So we'd have:
|
Most of the changes are done - I'll publish new snapshots tomorrow, given nobody notices any problems :) |
I mean milestones, not snapshots :) |
All done, 1.0.0-M3 for scala3, and 1.0.0-M5 for scala2 released, using the new group ids. |
Currently, only milestone releases of Magnolia are available. Note that since the last update of Magnolia in Scanamo, the project has moved to live in the https://github.com/softwaremill organisation, with an updated group id, and package name of `magnolia1` - some details about that here: softwaremill/magnolia#327
You've probably already considered this, but a consequence of this change has been bugging me, and I just wanted to get it down in words, and try to document what was bothering me: Scala 3 artifacts can be used in Scala 2 projects ( If an end-user project uses two libraries that depend on Magnolia (eg tapir, Scanamo, etc), one built for Scala 2.x (depending on In general, I think artifacts that have different group+artifact coordinates (modulo, in the case of Scala development, the scala-version portion of the artifact name) ideally shouldn't contain classes with identical package names, as there's always this risk of a namespace clash. One possible way to get round this might be different package namespaces for the Scala 2 & Scala 3 versions of magnolia - eg |
I don't think this works for macros |
The second part does:
https://docs.scala-lang.org/scala3/guides/migration/tutorial-macro-mixing.html |
@rtyley that's a good point, though say you have a Scala 3 project and you decide to use a Scala 2-based library. Any usage of Magnolia within that library will fail, as the macro just won't work. And I think usages of Magnolia within libraries are to expose typeclass generation for end-user types, not to use them internally. So I think in the end, you have to use the library version dedicated to your Scala version. If I understand correctly what @dwijnand is quoting, you could package two macros in a single jar and have the compiler decide which one to use. That won't work here as well, as we have different (even if only slightly) definitions of |
Currently, only milestone releases of Magnolia are available. Note that since the last update of Magnolia in Scanamo, the project has moved to live in the https://github.com/softwaremill organisation, with an updated group id, and package name of `magnolia1` - some details about that here: softwaremill/magnolia#327
Only the most recent releases of the Magnolia library are available for both Scala 2 and 3 - this is since the project maintainership moved to the https://github.com/softwaremill organisation. Note that as part of this move, there's an updated group id, and package name of `magnolia1` - some details about that here: softwaremill/magnolia#327
Only the most recent releases of the Magnolia library are available for both Scala 2 and 3 - this is since the project maintainership moved to the https://github.com/softwaremill organisation. Note that as part of this move, there's an updated group id, and package name of `magnolia1` - some details about that here: softwaremill/magnolia#327
Only the most recent releases of the Magnolia library are available for both Scala 2 and 3 - this is since the project maintainership moved to the https://github.com/softwaremill organisation. Note that as part of this move, there's an updated group id, and package name of `magnolia1` - some details about that here: softwaremill/magnolia#327
Currently a non-trivial amount of projects use magnolia 0.17 (https://mvnrepository.com/artifact/com.propensive/magnolia/usages). Releasing a binary-incompatible 1.0 with the same package name, could lead to unnecessary problems in the ecosystem.
That's why what I'd propose is:
magnolia1
for magnolia 1.0 (not ideal, but sincemagnolia
is taken, we can't do much here). This will allow us to freely rename the methods as proposed in rename combine/dispatch to join/split #247, aligning both magnolia flavors (for scala2 and scala3). So to use magnolia you'd have to doimport magnolia1.*
com.softwaremill.magnolia1_2
for magnolia-scala2, andcom.softwaremill.magnolia1_3
for magnolia-scala3. This is inspired by the suffixes which are added to all scala artifacts anyway, but here we need to use them in group ids as well, not only in versions (magnolia-scala2 is still a completely different codebase than magnolia-scala3)main
branch toscala3
(and keep it default), and thelegacy
branch toscala2
(there's nothing legacy about the scala2 version)What do you think?
TODO list:
The text was updated successfully, but these errors were encountered: