Skip to content

Should refuse to generate bindings if target directory already populated #253

Open

Description

@dicej

Per item 1 in #252 (comment), if the user tries to generate bindings using the same target directory twice in a row, or if that directory is already populated with a subset files and/or subdirectories which the bindings generator would need to replace or overwrite, componentize-py should halt and print an error indicating that the user should either remove those files and/or directories or choose a different target directory.

Activity

  1. mandesero commented on Oct 27, 2026

    @mandesero

    Would it make sense to add a --force option for clean bindings regeneration?

    I noticed that --allow-existing was introduced in #240 (aa3d6d10), but it doesn't remove stale files from previous generations.

    Unlike --allow-existing, --force could remove the previously generated bindings before regenerating them, while preserving user-owned files in the output directory.

    This would make iterating on WIT definitions more convenient without requiring manual cleanup after each change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions