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

Unlazy collections/delegates #1206

Merged
merged 3 commits into from
May 13, 2022
Merged

Unlazy collections/delegates #1206

merged 3 commits into from
May 13, 2022

Conversation

lkoe
Copy link

@lkoe lkoe commented May 12, 2022

#1194 unlazy collections/delegates

diffplug#1194 unlazy collections/delegates
@lkoe lkoe force-pushed the 1194-final-fix branch from 0c41535 to ce19481 Compare May 12, 2022 09:45
@lkoe lkoe changed the title Update JvmLocalCache.java Unlazy collections/delegates May 12, 2022
@nedtwigg
Copy link
Member

nedtwigg commented May 12, 2022

Ah, shoot. I misunderstood your comments in the issue, I thought you were missing the commits I made to handle collections, but in fact I was missing your point about this premature instanceof check. But now we expose another problem, visible in the test failures for predeclare blocks, which is that

EDIT: Explanation below turned out to be wrong

  • we unlazy as soon as a value is set
  • which means that we are "unlazying" intermediate values
  • which is slow for all builds, but creates a correctness problem for "predeclare" blocks because intermediate values might have un-predeclared versions which the user shouldn't have to fuss with

I'll need to think a bit for how we can fix this...

@nedtwigg
Copy link
Member

Oh good! It wasn't so bad. The issue was as simple as:

  • the predeclare task doesn't use the cache, thus it is running after the "unlazy" calls
  • so all we needed to do was make the predeclare task call unlazy on itself

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