Skip to content

Unlazy collections/delegates - #1206

Merged
nedtwigg merged 3 commits into
diffplug:mainfrom
lkoe:1194-final-fix
May 13, 2022
Merged

nedtwigg merged 3 commits into
diffplug:mainfrom
lkoe:1194-final-fix

Conversation

@lkoe

@lkoe lkoe commented May 12, 2022 •

Copy link
Copy Markdown

#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

nedtwigg commented May 12, 2022 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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