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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with zio-prelude 1.0.0-RC8-1 (zio1) macros and Scala 2.13.[9|10] #969

Closed
guizmaii opened this issue Oct 12, 2022 · 4 comments
Closed
Assignees

Comments

@guizmaii
Copy link
Member

guizmaii commented Oct 12, 2022

Hi everyone 馃檪

Since Scala 2.13.9, our prelude's newtypes are not compiling anymore.
I reported the issue to Scala here: scala/bug#12647

Lukas Rytz suggests making a change in prelude's macros to make them work with Scala 2.13.9+ here: scala/bug#12647 (comment)

I don't have enough time to try to make this change for now that's why I'm reporting this issue.
I'll probably not have any time to try to make a PR before a week or two.

Cheers,
Jules

@sideeffffect
Copy link
Member

@kitlangton you our macro guru. If you have the time, maybe you can have a look at this? 馃檱

@som-snytt
Copy link
Contributor

som-snytt commented Oct 12, 2022

I'm new to this code, but I suggest on the Scala ticket that it might be enough to

-  def assertion: QuotedAssertion[A] = new QuotedAssertion[A] {
+  def assertion: Any = new QuotedAssertion[A] {

where the Any magically makes the compiler use the refined RHS.

I haven't tried more than a simple test under Scala 2 only.

Edit: That doesn't work, but I'll look for an easy out.

@guizmaii
Copy link
Member Author

FYI, @som-snytt made a PR on Scala to fix this issue: scala/scala#10188

@guizmaii
Copy link
Member Author

Fixed in scala/scala#10188

Fix will be released with Scala 2.13.11

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