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 Lazy for tagged types #797

Merged
merged 1 commit into from
Jan 13, 2020
Merged

Conversation

joroKr21
Copy link
Collaborator

Fixes #584

Funny thing, this is also a partial fix for #309, but it looks like some types are automatically dealiased by Scala (e.g. lgen.Repr and Record.{..fields}.T) and in this case scala/bug#10506 kicks in.

@codecov-io
Copy link

codecov-io commented Dec 24, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@8ce40d1). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #797   +/-   ##
========================================
  Coverage          ?   87.9%           
========================================
  Files             ?      65           
  Lines             ?    1497           
  Branches          ?       5           
========================================
  Hits              ?    1316           
  Misses            ?     181           
  Partials          ?       0
Impacted Files Coverage Δ
core/src/main/scala/shapeless/lazy.scala 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ce40d1...fc1befc. Read the comment docs.

@melrief
Copy link
Contributor

melrief commented Dec 24, 2017

This is great, thank you @joroKr21 !

@milessabin
Copy link
Owner

Does this change actually break the test you've modified?

@milessabin milessabin added this to the shapeless-2.4.0 milestone Dec 29, 2017
@joroKr21
Copy link
Collaborator Author

Yes, the unmodified test fails because of ambiguous implicits, since the workaround for #309 is not necessary when deriving a typeclass instance for case class. However, it cannot be completely removed, because it is still necessary for the tests in LabelledGeneric211Tests. The difference is that the types in LabelledGeneric211Tests are eagerly dealiased (I realized this happens in existentialAbstraction).

@milessabin
Copy link
Owner

Gotcha ... I'm going to defer this to 2.4.0 and hopefully get a fix for scala/bug#10506 into 2.13.0.

@joroKr21
Copy link
Collaborator Author

@milessabin should we merge this for 2.4.0?

@milessabin
Copy link
Owner

Yes, I think so.

@milessabin milessabin merged commit 62c621c into milessabin:master Jan 13, 2020
@joroKr21 joroKr21 deleted the lazy-dealias branch January 13, 2020 14:45
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.

Interaction between Lazy and tagged types
4 participants