cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Soref <>
Subject Re: platform_parser.check_requirements() not needed?
Date Fri, 27 Jun 2014 02:06:23 GMT
Andrew wrote:
> 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.

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

At one point, something was also responsible for preventing the Apple platforms from downloading
on non Apple platforms, but I think I took away that part of the equation :).

> 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.

I guess I'm not opposed, this cleans up some code that I've been trying to manipulate in various

The blackberry10 implementation more or less is such that check_reqs calls init, and pretty
much everything else in blackberry10 also calls init, and the actual requirement checking
is done in init.

My experience w/ Android is that `cordova platform add android` generally fails because android/ant
aren't in the user's PATH, and it doesn't really enforce it well (I'm trying to be polite
with this understatement).

So, +1.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message