Skip to content

Support negated paths in .juliabundleignore #130

@lamdor

Description

@lamdor

Summary

.juliabundleignore does not currently support negated path patterns (using ! prefix) like .gitignore and .dockerignore do. This prevents users from creating ignore patterns that exclude most files while including specific exceptions.

Current Behavior

The .juliabundleignore file uses Glob.jl for pattern matching but does not handle negation syntax. When users try to use negated patterns like:

*
!programs/
!programs/*/
!Project.toml
!Manifest.toml

The negation (!) is not processed, resulting in unexpected behavior (e.g., empty appbundle.tar files).

Expected Behavior

.juliabundleignore should support gitignore-style negation patterns where lines starting with ! indicate exceptions to previous ignore rules. This would allow users to:

  1. Ignore everything by default (*)
  2. Then explicitly include specific files/directories with ! prefix

Implementation Notes

The current implementation is in src/PackageBundler/utils.jl (lines 81-87) where patterns are read but negation is not handled.

To support this feature, the code would need to:

  • Detect patterns starting with !
  • Apply these as exceptions to previously matched ignore patterns
  • Process patterns in order (similar to gitignore behavior)

Use Case

Users want to create minimal bundle uploads that include only specific directories (like programs/) and essential files (Project.toml, Manifest.toml) while excluding everything else, especially for large repositories.

References

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