You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Andrew Grieve <ag...@google.com> on 2014/06/27 03:53:26 UTC

platform_parser.check_requirements() not needed?

Android and iOS have empty functions for check_requirements(), and I think
that's the right way to go. Never really discussed it on list though, so
wanted to share why I think this.

Originally, the motivation was to run some checks *before* downloading the
platform.

It turned out that downloading platforms is not very expensive, and having
the platform requirements check code both in the platform (where it is
needed) and in CLI (copy & paste job), wasn't adding much value.

So... Platforms changed to lazy-loading first, then calling out to the
check() within the downloaded platform.

Now, since platforms scripts all work without CLI, it's important that
commands like `create` call check_requirements themselves before running,
and as far as I'm away, most platforms do this. So... now we've got the
same check() function being called twice. First by
CLI's check_requirements(), then by the create() script itself.

So, I think the best thing to do is just delete check_requirements() from
CLI and expect that the platform scripts do some checks themselves.