You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
processing cli does not support sketches with a different main.pde file #1219
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.
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.
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.
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.
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?
Activity
stepperpig commentedon Sep 1, 2025
Hi @Stefterv, I'd be interested in looking into this issue.
Stefterv commentedon 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 commentedon 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 commentedon 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.propertiesfile if no matching PDE is found, if no sketch.properties exists then the process should error out.skools-here commentedon 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 commentedon 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 commentedon Oct 30, 2025
hey @Stefterv is this issue still available? I would like to work on this, pls assign
fix(cli): support sketches with custom main file names
fix(cli): support sketches with custom main file names (processing#1329)