GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use lazy evaluation for dependencies of the zipDistributable task by neobrain · Pull Request #1474 · processing/processing4

Conversation

@neobrain

@neobrain neobrain commented Mar 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The createDistributable task is generated by the Compose plugin, so it's not always available when zipDistributable task is configured. Using lazy evaluation by wrapping these expressions in a Provider avoids that issue.

This issue was encountered in the Nix build, presumably because it uses single-threaded compilation. Combined with #1473 , this makes Processing buildable with Nix without external patches.

AI disclosure

Trees were burnt to come up with this PR since apparently that's the world we live in now. One day AI providers will at least give floor estimates of how many trees it took, but that day is not today.

I pointed Claude Opus 4.6 at the nixpkgs discussion about this problem and it correctly extracted the root cause as identified by @Stefterv in the comment chain. It correctly inferred that lazy task evaluation is required1. This was well-understood before asking Claude, but it's reassuring that it correctly reproduced these then-obvious findings.

It pointed me to the Provider.provider API (which I didn't know about for lack of familiarity with Gradle). I looked up and read the documentation for this API to understand how it works. The biggest challenge was picking the correct websearch result after realizing that provider is a function in the Provider interface (rather than a different entity), but besides that it's straightforward.

Claude produced a functional patch, however I discarded its changes and rewrote it myself with the new knowledge, though it ended up largely similar since it only affects a few lines of code and the core idea of lazy evaluation is the same. One alternative I considered is using Provider.map instead of re-wrapping providers, however there is no functional difference and it didn't help readability due to how distributable is defined.

I verified the zipDistributable target still works after running ./gradlew zipDistributable and verified that each of the steps still have the desired effect (by commenting them out individually and rerunning a clean build).


All words above this line were written and thought of by me, a human being. I physically moved a mouse and pushed keyboard buttons to open this PR. I had a ton of fun writing this text but, alas, I'm afraid the novelty of it will wear off.

Footnotes

  1. One possible alternative is to find where exactly Compose registers the createDistributable target and force this to happen before zipDistributable is evaluated, but I don't know how to figure this out and Claude didn't either. ↩

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SableRaf reacted with eyes emoji
All reactions
  • 👀 1 reaction
@neobrain
Use lazy evaluation for dependencies of the zipDistributable task
4673b6b
The createDistributable task is generated by the Compose plugin, so it's not
always available when zipDistributable task is configured. Using lazy
evaluation by wrapping these expressions in a Provider avoids that issue.

This issue was encountered in the Nix build, presumably because it uses
single-threaded compilation.
@SableRaf SableRaf assigned Stefterv Mar 5, 2026
Stefterv
Stefterv approved these changes Mar 6, 2026
View reviewed changes
catilac
catilac approved these changes May 22, 2026
View reviewed changes
@catilac
catilac merged commit 174753c into processing:main May 22, 2026
@catilac

catilac commented May 22, 2026

Copy link
Copy Markdown
Collaborator

@neobrain merged. years later ;0

neobrain reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

neobrain referenced this pull request Jul 20, 2026
@tychedelia @catilac @Stefterv
Merge WebGPU backend (#1514)
25bca44
* *:ꔫ:*Renderer Project*:ꔫ:*

* Create workspaces for ffi and the renderer (#1275)

* Inital scaffold for libprocessing ffi.

* Remove EAP.

* Update docs.

* Factor out gradle utils. Add flag for disabling webgpu and enforcing android source level compat.

* Remove processing.h

* Set java version for all projects.

* libprocessing ffi error handling (#1293)

* FFI error setup

* Clear before init.

* Basic app lifecycle / surface creation.

* Throw when not on macos.

* Implement `background` method (#1308)

* Implement background.

* Install wayland deps.

* Support for windows surfaces. (#1310)

* Implement basic rendering flow (#1322)

* Implement basic rendering flow

* Fix naming.

* Actually fix rename.

* libprocessing submodule

* --recursive when cloning repo

* Enable submodule checkout in Gradle workflow

Added support for submodules in the checkout step.

* Enable submodules in checkout steps

Added submodule support to the checkout steps.

* Wayland support with new WebGPU renderer

* Gradle fixes from libprocessing refactor. (#1346)

* Updates from libprocessing. (#1392)

* Updates from libprocessing.

* Fixes for compat with main 17.

* Fixup docs.

* Upgrade to jdk-25.

* Upgrade to jdk-25.

* Materials, lights, input event forwarding, ellipse fix.

* Get the gradle sketch runner working locally.

* Conditionally execute webgpu tests

* ProcessingLibraryPlugin JVM Toggle update

* 4.5.5 in gradle.properties

* ProcessingPlugin fixes

---------

Co-authored-by: Moon D. <[email protected]>
Co-authored-by: Moon <[email protected]>
Co-authored-by: Stef Tervelde <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@catilac catilac catilac approved these changes
+1 more reviewer
@Stefterv Stefterv Stefterv approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Stefterv Stefterv

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@neobrain @catilac @Stefterv
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.