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

Implement Scala 3 support #573

Merged
merged 12 commits into from
Jan 27, 2023
Merged

Implement Scala 3 support #573

merged 12 commits into from
Jan 27, 2023

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Oct 24, 2022

Closes #506

Probably it is better to wait until this repo migrates from TravisCI to GitHub Actions in #529

  • Scala dependencies are bumped to newer versions that support Scala 3
    • Note that I pinned Akka to v2.6.x since v2.7.x introduced BSL
    • Also note that shapeless has a separate shapless-3 for Scala 3. So I moved shapless2-based spec to scala-2 directory.
    • Scalafmt introduced a bunch of format changes, so applied new format with a effort to minimize diff.
  • Minor Scala 3 compiler errors are addressed.
  • Macros are extracted into better.files.ResourceScalaCompat and have different implementations in scala-2 and scala-3 since macro mechanism is incompatible.
    • I am not good at Scala 3 macro, so maybe something is missing.

@exoego exoego mentioned this pull request Oct 24, 2022
* @see
* [[https://docs.oracle.com/javase/10/docs/api/java/lang/Class.html#getResource(java.lang.String) Class#getResource]]
*/
def at(clazz: Class[_]): Resource = new Resource {
Copy link
Contributor Author

@exoego exoego Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not implemented atDymanic(Class) macro here since passing Class instance happens at run-time and the compile-time macro seems not needed IIUC.

@oyvindberg
Copy link

any chance of merging this soon @pathikrit ? 🙏

@pathikrit pathikrit merged commit 0e23954 into pathikrit:master Jan 27, 2023
@mkurz
Copy link

mkurz commented Jan 27, 2023

@pathikrit Would be nice if you could also release a new version with the Scala 3 artifacts, thanks!

@exoego exoego deleted the scala3 branch January 27, 2023 22:13
@mkurz
Copy link

mkurz commented Feb 1, 2023

@pathikrit Ping 😉 Any chance to release a new version soon with the Scala 3 artifacts? Also there are a lot of PR with dependency upgrades: https://github.com/pathikrit/better-files/pulls
Would be really nice, thanks!

@SethTisue
Copy link
Contributor

@pathikrit Would you like more maintainers? I can't afford to get very deeply into the code here, but I can certainly help with reviewing and merging routine PRs, especially for things like dependency upgrades, build improvements, and so forth. Perhaps other volunteers would also be interested.

@pathikrit
Copy link
Owner

Ok I think I finally managed to release v3.9.2 for Scala 3:
https://github.com/pathikrit/better-files/actions/runs/4117102133/jobs/7107991092#step:7:330

Please confirm usage!

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

Successfully merging this pull request may close these issues.

Scala3 version
5 participants