rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

Extend `GlobVec` to know about negative globs

Open wolfv opened this issue 1 year ago • 0 comments

There is an open PR in conda-build to add negative globs to the schema. It's also something I wanted in rattler-build.

The idea would be to first select all matching files by positive globs, and then remove everything that matches a negative glob.

In conda-build the implementation uses:

include:
 - bla/*
 - foo/*
exclude:
 - foo/lib/*

We could also simplify it potentially by using the first character as a marker, such as:

- bla/*
- foo/*
- ~ foo/lib/*

The ! would be better, but is reserved in YAML for custom tags. Another character that might work is ^.

Lastly, we could also do something like:

- bla/*
- foo/*
- exclude:
  - foo/lib/*

wolfv avatar Apr 20 '24 06:04 wolfv