ansible-collections / news-for-maintainers

Announcements of changes impacting collection contributors and maintainers
27 stars 4 forks source link

New mechanism for including/excluding files during collection build #22

Closed sivel closed 5 months ago

sivel commented 2 years ago

We merged a new opt-in feature yesterday, allowing a galaxy.yml to specify MANIFEST.in directives instead of utilizing build_ignore.

The effective outcome is that manifest: is exclusive by default, whereas build_ignore: is inclusive by default. When using manifest: there are a default set of directives that should meet the majority of users use cases, as opposed to what build_ignore: had provided. Simply adding manifest: to galaxy.yml and ensuring no build_ignore: is specified will opt into this behavior.

You can read more about this at https://docs.ansible.com/ansible-core/devel/dev_guide/developing_collections_distributing.html#manifest-directives

This will be included in 2.14, and as of now requires installing the optional dependency distlib. We plan to discuss whether we make distlib a hard dependency, and promote manifest: as the default, but for now, it is opt-in and an optional dependency.

D3DeFi commented 2 years ago

I am not sure what files we would be skipping. Perhaps only:

I wonder if tests are omitted by default. Need to check when I have a chance.

Any other ideas what to skip and if something at all?

sivel commented 2 years ago

docs and tests are purposefully included in the default manifest directives. docker-compose.yml would not be included in the root, but would be if it happens to appear in a place where .yml files are included. If you read the documentation link provided above, it outlines the default directives in use.

Please feel free to create a discussion at https://github.com/ansible-collections/news-for-maintainers/discussions if you would like to discuss this further.