-
Notifications
You must be signed in to change notification settings - Fork 100
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
Update scala 3 version, drop support for scala 2 #527
base: master
Are you sure you want to change the base?
Conversation
Hadn't updated the scala 3 version in the GitHub workflow so that test failed. Pushed an update there |
So anyway this whole pr was way off base and I do apologise for that. I guess I figured it might still be worth leaving open on the off-chance, and because it had already been tagged (presumably because of my initial false claim about the downstream impact 😬). I was tempted to close it or mark as draft but... idk. Potentially scala 3.4 warrants discussing even though I originally introduced the idea for bad reasons |
Hey, i don't know about that. It will need a review for sure if there's a potential impact. But we should be able to follow new Scala versions in principle unless there's some breaking changes. After all, if someone wants a ScalaMock for an older versions, Sonatype (to my knowledge) doesn't purge versions so there's always a fallback |
As a library, I'd suggest staying on LTS versions, as not to force downstreams to update |
I think there is no problem of bumping version up to latest 3.4 or even 3.5.0 if we can get rid of annotating everything as Anyway we are exploiting a bug in the compiler to make it work. If we decide to go experimental way, I would also consider using TupledFunction to make scalamock simpler |
Also, in my opinion, we should drop support for Scala 2.12 and Scala 2.13, since library (scala 2) is stable enough and nobody would fix anything for scala 2 anyway. This would unlock futher library development. |
@goshacodes I love that energy. Happy to drop scala 2 support in this pr. Will look into your suggestions on this after I've addressed the ones on the other two. |
Agree on Scala 2.x support, we have a maintenance-5.x branch that could be used to patch bugs there, but it's been pretty hard to work out some of the macro-related problems in the past, I certainly tried :D |
Let's proceed then. @hughsimpson please drop scala 2 in this PR |
@goshacodes Dropped scala 2, haven't looked into |
At first lets rewrite everything to scala 3 with scalafix (or similar utility, not sure which one does it) With tupled functions research is needed anyway, If you want to take it, it will be great |
@hughsimpson opened an issue about TupledFunction #533 |
Not sure if I'll get to it or not... Once the next release is cut with the bugfix prs I'll probably be snowed under trying to finalise some chunky migrations, so will probably vanish off the reservation for a while tbqh. But if it's still waiting for me when that work is done I'll be diving straight in |
The With a Scala 3 focus, there is probably not a great rationale anymore for this package |
I don't mind ripping out a bit more whilst I'm in here. @barkhorn @goshacodes you think this pr should go further? Or merge as it stands and perform the rest of the actions in follow-up? |
I think we should merge as it is now and handle it later. Just asked) |
sorry, some recent changes have caused merge conflicts, would you be able to look again please? |
I've recently found one issue, which IMO should be fixed before we merge this. Current |
I'll rebase this tomorrow. No worries. As far as the concurrency issue goes, no idea yet. Will look then. EDIT: I couldn't write a test for that error yet. |
I've had a crack at that bug here. Pushed the test before the fix so you can see that it at least failed in scala 2.13 and 3 with the expected error. Probably the best I can do, took way too long to write a test that failed consistently without the fix. Not sure why it passes on 2.12, maybe differences in Future implementation? |
This should go as 7.0 series |
Pull Request Checklist
Removes scala 2, updates scala 3 to 3.4.2, adds
-experimental
compiler flag to negate need for bug/workaround