Skip to content
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

Automatically filter package-private changes on Scala 3 #682

Closed
armanbilge opened this issue Jan 19, 2022 · 6 comments · Fixed by #683
Closed

Automatically filter package-private changes on Scala 3 #682

armanbilge opened this issue Jan 19, 2022 · 6 comments · Fixed by #683
Assignees

Comments

@armanbilge
Copy link
Contributor

This first came up in typelevel/cats#4062 (comment). We're in the process of enabling MiMa for Scala 3 for several Typelevel projects and we're having to add a lot of filters (e.g. http4s/http4s#5900). Getting support for package privates in Scala 3 on par with Scala 2 would be phenomenal. Thanks!

@armanbilge
Copy link
Contributor Author

See also typelevel/fs2#2791 which had many MiMa issues regarding default params.

@dwijnand dwijnand self-assigned this Jan 20, 2022
@dwijnand
Copy link
Collaborator

dwijnand commented Jan 20, 2022

I'll try to bring package private support for Scala 3.

For the separate default parameters issue, do you have a clear example of mima warning but the program (which makes a reasonable attempt to fail) doesn't crash (aka a false positive). Or is it a dotty bug where the encoding is problematic for API migrations (e.g the static/non-static part)?

@armanbilge
Copy link
Contributor Author

armanbilge commented Jan 20, 2022

Thanks, much appreciated!

For the separate default parameters issue, do you have a clear example of mima warning but the program (which makes a reasonable attempt to fail) doesn't crash (aka a false positive). Or is it a dotty bug where the encoding is problematic for API migrations (e.g the static/non-static part)?

Apologies, no, I haven't put that together. However I did decompile the output of Scala 2.13 and Scala 3 in typelevel/fs2#2791 (comment) and it appears to me that default parameters are encoded in much the same way, except that in Scala 3 the methods are not marked as synthetic on the bytecode level which causes MiMa to flag them.

@armanbilge
Copy link
Contributor Author

@dwijnand there wouldn't happen to be a MiMa release on the horizon? Would be nice not to have to add so many Scala 3-specific filters in typelevel/cats-effect#2857. Thanks! :)

@dwijnand
Copy link
Collaborator

Yep, I'll try to tee one up for next week.

@armanbilge
Copy link
Contributor Author

@dwijnand polite bump, if you have a chance. Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants