GeezerVison is showing github.com — `processing cli` does not support sketches with a different `main.pde` file · Issue #1219 · processing/processing4
processing cli does not support sketches with a different main.pde file #1219
DescriptionMost appropriate sub-area of Processing 4?
PDE
Processing version
4.4.6
Operating system
macOS
Bug description
When running the Processing cli, having a sketch with a different main file, e.g. sketch/main.pde the cli returns that the sketch is not a valid sketch folder, sketch/sketch.pde does not exist.
Steps to reproduce this
-
Create a new sketch
-
Rename the main file
-
Try to run the sketch with the cli
snippet
No response
Additional context
No response
Would you like to work on the issue?
No, I’m just reporting the issue Activitystepperpig commented on Sep 1, 2025 Hi @Stefterv, I'd be interested in looking into this issue. Stefterv commented on Sep 2, 2025 Hi @stepperpig Great that you are interested, could you give us a quick overview of what your approach would be? skools-here commented on Sep 8, 2025 Hi, I’d like to work on this issue.
According to me currently, the CLI enforces the rule that the main .pde file must match the sketch folder name (e.g. sketch/sketch.pde). If the file is renamed (e.g. main.pde), it fails.
Instead, it must:
First look for a .pde file matching the folder name (current behavior).
If not found, fall back to the first .pde file in the sketch folder (same behavior the PDE GUI uses).
Add tests to ensure sketches with main.pde or other names can still run from the CLI.
I think this will work good. Stefterv commented on Sep 8, 2025 Hi @skools-here thank you for this description! I can tell you that the PDE looks for the sketch defined in the sketch.properties file if no matching PDE is found, if no sketch.properties exists then the process should error out. skools-here commented on Sep 8, 2025 Thanks for the clarification!
So for the fix, I can update the CLI so that:
It first looks for .pde as it does now.
If that’s missing, it will check sketch.properties for the main entry and use that file as the entry point.
If neither .pde nor sketch.properties exists, the CLI will return an error.
This should bring the CLI in line with the PDE’s behavior. I’ll also add/update tests to cover the cases with main.pde and with/without sketch.properties. Mr-KRAMA commented on Sep 23, 2025 Hi @Stefterv, I'm interested in contributing to Processing. I see #1219 is already assigned, but I'd be happy to help with other CLI-related issues or review/test the current fix. Are there any other good first issues I could work on? avinxshKD commented on Oct 30, 2025 hey @Stefterv is this issue still available? I would like to work on this, pls assign added a commit that references this issue on Nov 18, 2025This issue will close once commit 8a4ea97 is merged into the 'main' branch.8a4ea97 added a commit that references this issue on Jan 28, 2026This issue will close once commit fa85cd4 is merged into the 'main' branch.fa85cd4
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|