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

Fix allPartsStrong #279

Merged
merged 3 commits into from
Apr 7, 2022
Merged

Conversation

kitlangton
Copy link
Member

@adamgfraser, @swoogles and I ran into a Tag issue with ZIO that stemmed from Tags being synthesized for abstract type members of traits, instead of being recursively summoned. This should (hopefully) fix that 😄

@@ -23,6 +25,11 @@ class TagTest extends SharedTagTest with TagAssertions {
assertNotChild(Tag[Animal | String].tag, Tag[Dog | String].tag)
}

"Does not synthesize Tags for abstract types, but recursively summons" in {
Copy link
Member

Choose a reason for hiding this comment

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

This should be part of SharedTagTest I believe, to ensure the behavior is the same in Scala 2 & 3. You may also want to test against types object X; X.T, val x; x.T & trait X; X#T since they're all quite different types than this.T aand Tag does not behave uniformly wrt them all

@kitlangton
Copy link
Member Author

Alrighty :) I've moved it to the SharedTagTest and added some additional cases

@kitlangton
Copy link
Member Author

Ah interesting. So two of these should fail on Scala 3. I see what you mean. I'll see if I can get that to be consistent.

@kitlangton
Copy link
Member Author

I think I got it! Come on CI 🤞

@kitlangton
Copy link
Member Author

kitlangton commented Apr 7, 2022

Once this is good to go, would it be possible to merge and release a new version? Hoping to resolve this issue (zio/zio#6546) in the next ZIO 2 RC 😄 Many thank yous!

@neko-kai
Copy link
Member

neko-kai commented Apr 7, 2022

@kitlangton I think I'm going to release this fix under 2.1.0 series since it seems stable after testing and it includes your previous fix (50def11) (https://github.com/zio/izumi-reflect/releases/tag/v2.1.0-M1)
Are you ok with that?

@neko-kai neko-kai merged commit 6a86ff3 into zio:develop Apr 7, 2022
@kitlangton
Copy link
Member Author

Totally! Thanks so much @neko-kai

@neko-kai
Copy link
Member

neko-kai commented Apr 7, 2022

Version 2.1.0 is released now.
@kitlangton Actually, could you please add a test for val x; x.T case in the next PR? It's different from object case in Scala 2, and there's also a disrepancy in treatment of val/object prefixes between Scala 2 / Scala 3 wrt implicit resolution.

@kitlangton
Copy link
Member Author

Will do!

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.

2 participants