Skip to content

fix #9276: check valdef is realizable at pickler #11843

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

Closed
wants to merge 1 commit into from

Conversation

bishabosha
Copy link
Member

fixes #9276

@bishabosha bishabosha requested a review from smarter March 22, 2021 14:00
@bishabosha bishabosha added this to the 3.0.0-RC2 milestone Mar 22, 2021
@bishabosha bishabosha requested a review from odersky March 22, 2021 14:06
@bishabosha
Copy link
Member Author

bishabosha commented Mar 22, 2021

this is probably a do not merge, I will repost this comment here:
#9276 (comment)

@smarter
Copy link
Member

smarter commented Mar 22, 2021

test performance please

@dottybot
Copy link
Member

performance test scheduled: 1 job(s) in queue, 0 running.

@@ -343,6 +343,11 @@ class TreePickler(pickler: TastyPickler) {
case _ if tpt.isType => pickleTpt(tpt)
}
pickleTreeUnlessEmpty(rhs)
mdef match
case _: ValDef if !sym.is(StableRealizable) =>
Copy link
Member Author

Choose a reason for hiding this comment

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

should probably check the tag instead

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/11843/ to see the changes.

Benchmarks is based on merging with master (75f7cb3)

@dottybot
Copy link
Member

dottybot commented Mar 22, 2021

performance test failed:

Please check http://contact.support/pull-11843-03-22-17.40.out for more information

Edit: this is from the new machine, please ignore it.

@odersky
Copy link
Contributor

odersky commented Mar 22, 2021

test performance please

@dottybot
Copy link
Member

performance test scheduled: 1 job(s) in queue, 0 running.

@odersky
Copy link
Contributor

odersky commented Mar 22, 2021

The problem with this is: checking realizability is usually cheap but has unbounded complexity for lazy vals. We sort of rely on the fact that the intersection of (non-object) lazy vals and vals with type members (where we check stability) is usually small. But with this PR that consideration is now invalid; we will check realizability for every val, at possibly unbounded cost. So, that makes me nervous, even if our benchmarks don't show it.

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/11843/ to see the changes.

Benchmarks is based on merging with master (4035f51)

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

I think in summary the potentially unbounded slowdowns weigh more heavily than the potential gains

@bishabosha bishabosha closed this Mar 23, 2021
@bishabosha
Copy link
Member Author

close in favor of #11858

@bishabosha bishabosha deleted the fix-9276 branch September 10, 2021 14:07
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.

Val is not stable unless path requested by use site
4 participants