canonical / rockcraft

Tool to create OCI Images using the language from Snapcraft and Charmcraft.
GNU General Public License v3.0
25 stars 33 forks source link

fix: delay enabling the overlay feature #592

Closed tigarmo closed 1 week ago

tigarmo commented 1 week ago

Previously, the craft-parts Feature creation was happening as soon as the lifecycle_service module was imported (as top-level code). This was an erroneous attempt to address the fact that the feature has to be enabled by the time the Application loads the project but also in tests.

Instead, just enable the feature when creating the Project object, regardless of "origin". This way we can ensure the Project itself is doing the right thing, without special test setup that might not reflect production "reality".

Fixes #585