The fact that the extensions attribute is on individual apps results in extension overlap.
Consider the following example (example names all around obviously)
apps:
allo:
command: launch allo
extensions: [launcher]
pronto:
command: launch pronto
extensions: [launcher]
This should be perfectly reasonable to write. I have two apps, both rely on the launcher extension to work.
LauncherExtension
may create a part which organizes launch
into place. Which is why the apps need the extension.
What will happen when you snapcraft that is:
Failed to apply extension 'launcher': this extension adds a part named 'launchpart', but a part by that name already exists.
Rename the 'launchpart' part to something else and try again.
This seems to be caused by the fact that foreach app the extension is applied. However, parts
is not a per-app affair, so applying the extension twice will attempt to inject the same parts twice and thus result in the conflict.
What I think should happen is that the extension.parts
must only be applied once even when the same extension is used more than once?
Same with extension.part_snippet
I suppose.