Code review comment for lp:~jml/bzr/lp-login-oauth

Revision history for this message
Andrew Bennetts (spiv) wrote :

I agree with Martin's concern about unnecessary imports.

jml and I just discussed this on IRC, and I suggested that the command should always exist, and that the dependency should be lazily loaded (via lazy_import or a regular function-local import, it doesn't matter). If the user tries the command and the dependency is missing, then it should fail with a reasonably friendly error telling the user about the missing dependency.

jml said on IRC: "I can imagine it being a little confusing to have lots of available commands that you can't actually use," but a) this concern seems a bit premature, and b) I think no more confusing than commands being missing for obscure reasons even though their plugin is installed.

review: Needs Fixing

« Back to merge proposal