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

Dotty compatibility #936

Closed
larsrh opened this issue Sep 16, 2020 · 10 comments
Closed

Dotty compatibility #936

larsrh opened this issue Sep 16, 2020 · 10 comments

Comments

@larsrh
Copy link
Contributor

larsrh commented Sep 16, 2020

This likely requires a ton of work.

For starters, typelevel/cats#2041 needs to be done first.

@cquiroz
Copy link
Collaborator

cquiroz commented Dec 11, 2020

I'd be interested to tackle this one. Can we get an algebra release with Dotty support?

@larsrh
Copy link
Contributor Author

larsrh commented Dec 12, 2020

2.1.0 is out

@cquiroz
Copy link
Collaborator

cquiroz commented Dec 12, 2020

Thanks

@cquiroz
Copy link
Collaborator

cquiroz commented Jan 4, 2021

I started cracking at this and it's going to be quite a bit of changes given the amount of macros.

One of the first things I'd like to do is to get rid of all warnings and move to munit

Could I drop support for 2.12 to make the conversion to dotty easier, it would let me get rid of most warnings and scala-collection-compat

@larsrh
Copy link
Contributor Author

larsrh commented Jan 4, 2021

Fine with me, I'd say.

@cquiroz
Copy link
Collaborator

cquiroz commented Jun 23, 2021

I'm still doing some progress with this. A difficulty is the amount of macros spire has so a first round of a port will only do macros where strictly necessary. In cases where a macro is only done for performance reason it will be done later.

One of the macros that seem to need to be ported is Checked
https://github.com/typelevel/spire/blob/master/macros/src/main/scala/spire/macros/Checked.scala#L170

If you think not please let me know and how should I replace it

Note that this bug was a showstopper but it has been fixed upstream
scala/scala3#12708

@SethTisue
Copy link
Member

not sure if @bishabosha's https://github.com/bishabosha/spire-scala3 has anything useful here — perhaps you've already surpassed it

@cquiroz
Copy link
Collaborator

cquiroz commented Jul 14, 2021

Thanks for the tip. I managed to compile core but still have troubles porting some of the macros

We'd need to make sure the tests run too

@cquiroz
Copy link
Collaborator

cquiroz commented Aug 18, 2021

Got the Checked.scala macro ported. This lets me know fully compile core in scala 3.
I'm not very familiar with macros but tests are passing. I'd appreciate feedback if you want to take a look

https://gist.github.com/cquiroz/8c6825aae439230f2850fc2eb93410d0

@armanbilge
Copy link
Member

#1067.

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

No branches or pull requests

4 participants