Merge lp://staging/~ted/ubuntu-app-launch/snappy-backend-no-snap into lp://staging/ubuntu-app-launch/16.10
- snappy-backend-no-snap
- Merge into trunk.16.10
Status: | Merged |
---|---|
Approved by: | Ted Gould |
Approved revision: | 371 |
Merged at revision: | 252 |
Proposed branch: | lp://staging/~ted/ubuntu-app-launch/snappy-backend-no-snap |
Merge into: | lp://staging/ubuntu-app-launch/16.10 |
Prerequisite: | lp://staging/~ted/ubuntu-app-launch/snappy-backend-no-find-discover |
Diff against target: |
1419 lines (+698/-265) 14 files modified
docs/index.rst (+11/-1) libubuntu-app-launch/app-info.c (+6/-128) libubuntu-app-launch/app-info.h (+0/-35) libubuntu-app-launch/appid.h (+61/-0) libubuntu-app-launch/application-impl-click.cpp (+109/-0) libubuntu-app-launch/application-impl-click.h (+27/-0) libubuntu-app-launch/application-impl-legacy.cpp (+102/-6) libubuntu-app-launch/application-impl-legacy.h (+26/-0) libubuntu-app-launch/application-impl-libertine.cpp (+97/-0) libubuntu-app-launch/application-impl-libertine.h (+30/-0) libubuntu-app-launch/application.cpp (+173/-51) libubuntu-app-launch/registry.cpp (+1/-1) libubuntu-app-launch/ubuntu-app-launch.cpp (+18/-11) tests/libual-cpp-test.cc (+37/-32) |
To merge this branch: | bzr merge lp://staging/~ted/ubuntu-app-launch/snappy-backend-no-snap |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Charles Kerr (community) | Approve | ||
unity-api-1-bot | continuous-integration | Approve | |
Review via email:
|
This proposal supersedes a proposal from 2016-08-03.
Commit message
Make find and discover use the application implementation functions.
Description of the change
This MR migrates the the find and discover functions over to the C++ interfaces, and importantly pushes the implementation of the various parts into the implementation classes. This was done so that we can easily add implementations (say for snappy) and have it work to find/discover AppIDs correctly.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : Posted in a previous version of this proposal | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:357
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:358
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:360
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Charles Kerr (charlesk) wrote : | # |
By some yardstick this was an easier review -- the code diff is smaller -- but I had a lot of questions about the type-specific methods.
Questions and comments inline
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ted Gould (ted) wrote : | # |
On Wed, 2016-08-24 at 18:53 +0000, Charles Kerr wrote:
> By some yardstick this was an easier review -- the code diff is
> smaller -- but I had a lot of questions about the type-specific
> methods.
I think a lot of your questions came from not knowing the different
AppID schemes, which really means we didn't do a good job of
documenting that. So I tried to do that with narrative text on each of
the implementations: r363
> > + if (apps.size() == 0)
> apps is a std::list<> so size() has to walk the list.
>
> Since size is used twice in this function (here and in ONLY_LISTED
> below) better to store it in a temporary.
>
> In general, better to say "if (!foo.empty())" than "if (foo.size() ==
> 0)"
List size is constant since C++11: http://
tainer/list/size
But yes, empty would look better. r364
> > + switch (card)
> > + {
> > + case AppID::
> > + return *apps.begin();
> > + case AppID::
> out-of-scope for this review, but as an aside, what's the use case
> for LAST_LISTED?
Added for completeness, seemed odd to have first and only but not last.
I think almost everyone uses first.
> > + catch (std::runtime_
> > + {
> > + return false;
> does e.what need to be logged here? Looks like the answer is 'no' but
> wanted to be sure
No, it gets checked a fair amount and would be too chatty.
> +bool Legacy:
> > std::shared_
> > +{
> > + return package.
> (needinfo) Wait, whaaaat? Why would a function named verifyPackage()
> return true iff no package?
For Legacy apps the package field is empty.
> > + std::string desktop = std::string(
> redundant type information, suggest auto on lhs
> > >
> > + std::function<
> > [&desktop](const gchar* dir) {
> redundant type information, suggest auto on lhs
r365
> > +AppID::Version Legacy:
> > + const AppID::AppName& appname,
> > + const
> > std::shared_
> > +{
> > + return AppID::
> (needinfo) Why does findAppname() throw but findVersion() returns
> empty?
So my thought there was that if you're looking for the version, the
answer is always "", but we can't ever find an application, so that's
an error.
> > +/** Checks the AppID by making sure the version is "0.0" and then
> > + calling verifyAppname() to check the rest.
> (needinfo) Same "whaaaat" as above, I think I'm missing some context
> here. I don't understand what this is for, nor why a 0.0 test is
> useful
All Libertine applications have a version string of "0.0".
Using it as a test to reject things quickly. Since basically our
algorithm is "try all implementations" we end up with wanting to reject
as much as possible.
> > + catch (std::runtime_
> > + {
> > + return false;
> is this normal, or should e.what() be logged?
Normal.
> > + auto container =...
- 361. By Ted Gould
-
Bring in updates to no-find-discover branch
- 362. By Ted Gould
-
Fix abicheck
- 363. By Ted Gould
-
Write text explaining the app id schemes for the various backends
- 364. By Ted Gould
-
Use empty instead of checking the size
- 365. By Ted Gould
-
Going full auto
- 366. By Ted Gould
-
Removing a string cast
- 367. By Ted Gould
-
Spelling fix
- 368. By Ted Gould
-
Make sure we don't copy the tools structures
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:368
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Charles Kerr (charlesk) wrote : | # |
Thanks for the changes, especially the extra explanations. :)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:369
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:370
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:371
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Charles Kerr (charlesk) wrote : | # |
Reapprove to pick up r370
FAILED: Continuous integration, rev:352 /code.launchpad .net/~ted/ ubuntu- app-launch/ snappy- backend- no-snap/ +merge/ 301966/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/ /jenkins. canonical. com/unity- api-1/job/ lp-ubuntu- app-launch- ci/18/ /jenkins. canonical. com/unity- api-1/job/ build/277/ console /jenkins. canonical. com/unity- api-1/job/ build-0- fetch/283 /jenkins. canonical. com/unity- api-1/job/ build-1- sourcepkg/ release= vivid+overlay/ 217 /jenkins. canonical. com/unity- api-1/job/ build-1- sourcepkg/ release= xenial+ overlay/ 217 /jenkins. canonical. com/unity- api-1/job/ build-1- sourcepkg/ release= yakkety/ 217 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 146/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= yakkety/ 146/console
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/unity- api-1/job/ lp-ubuntu- app-launch- ci/18/rebuild
https:/