Merge lp://qastaging/~mterry/snapcraft/x-local-plugin into lp://qastaging/~snappy-dev/snapcraft/core
Status: | Merged |
---|---|
Approved by: | Michael Vogt |
Approved revision: | 94 |
Merged at revision: | 98 |
Proposed branch: | lp://qastaging/~mterry/snapcraft/x-local-plugin |
Merge into: | lp://qastaging/~snappy-dev/snapcraft/core |
Diff against target: |
286 lines (+123/-68) 5 files modified
integration-tests/data/local-plugin/snapcraft.yaml (+1/-1) snapcraft/plugin.py (+70/-56) snapcraft/tests/mock_plugin.py (+21/-0) snapcraft/tests/test_plugin.py (+31/-4) snapcraft/yaml.py (+0/-7) |
To merge this branch: | bzr merge lp://qastaging/~mterry/snapcraft/x-local-plugin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt (community) | Approve | ||
Review via email: mp+265436@code.qastaging.launchpad.net |
Commit message
Look for a local plugin if and only if the plugin name starts with 'x-'.
This was a Mark-requested feature at the IoM, and I think it's fine. It didn't get coded that way at first, because I forgot about it. :-/
This means that parts-from-the-sky or that were copy-and-pasted won't accidentally pick up your weird local plugin. It also means that the user is very explicitly opting into a local plugin (and thus we don't need the warning output about using a local plugin).
Description of the change
Look for a local plugin if and only if the plugin name starts with 'x-'.
This was a Mark-requested feature at the IoM, and I think it's fine. It didn't get coded that way at first, because I forgot about it. :-/
This means that parts-from-the-sky or that were copy-and-pasted won't accidentally pick up your weird local plugin. It also means that the user is very explicitly opting into a local plugin (and thus we don't need the warning output about using a local plugin).
Thanks a bunch for this branch. The code looks fine, the fact that there is no unittest bothered me a little bit and I created lp:~mvo/snapcraft/split_init that refactors __init__ a bit and adds a unittests for local/non-local loading of the plugins. I will do a MP against this branch so that you can let me know what you think there :)