Skip to content

processing cli does not support sketches with a different main.pde file #1219

Closed

Description

@Stefterv

Most 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

  1. Create a new sketch

  2. Rename the main file

  3. 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

Activity

  1. added
    bugSomething isn't working
    help wantedExtra attention is needed
    pdeProcessing Development Environment
    on Aug 28, 2025
  2. stepperpig commented on Sep 1, 2025

    @stepperpig

    Hi @Stefterv, I'd be interested in looking into this issue.

  3. Stefterv commented on Sep 2, 2025

    @Stefterv
    MemberAuthor

    Hi @stepperpig Great that you are interested, could you give us a quick overview of what your approach would be?

  4. skools-here commented on Sep 8, 2025

    @skools-here

    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.

  5. Stefterv commented on Sep 8, 2025

    @Stefterv
    MemberAuthor

    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.

  6. skools-here commented on Sep 8, 2025

    @skools-here

    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.

  7. Mr-KRAMA commented on Sep 23, 2025

    @Mr-KRAMA

    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?

  8. avinxshKD commented on Oct 30, 2025

    @avinxshKD
    Contributor

    hey @Stefterv is this issue still available? I would like to work on this, pls assign

  9. added a commit that references this issue on Nov 18, 2025
    8a4ea97
  10. added a commit that references this issue on Jan 28, 2026
    fa85cd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededpdeProcessing Development Environment

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions