You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Martin Gonzalez Glez <ma...@gmail.com> on 2014/04/08 21:02:56 UTC

CB-6415 [Blackberry] unable to add platform, using custom or local library

https://issues.apache.org/jira/browse/CB-6415

I've faced this problem this morning, when I tried to use a local library
to add the platform.
Has anybody ever faced this problem?

Re: CB-6415 [Blackberry] unable to add platform, using custom or local library

Posted by Josh Soref <js...@blackberry.com>.
I wrote:
> BlackBerry has code in places which do a lot of `mixin` which would
>Result in stuff like this working w/o requiring all the strange logic
>that¹s currently scattered through multiple files.

> I¹m going to probably try (unfortunately not until near the end of the
> month) replace the mess that¹s currently lying around w/ such mixin code,
> which should result in things being considerably cleaner.

Done. I like it a lot better now.

https://github.com/blackberry/cordova-cli/tree/config_json_platform

Now passes tests. Things are much cleaner this way.

It will probably conflict w/ someone’s landing of the e2e move, but that
isn’t a big deal.

Tomorrow, I’ll stick a bug up documenting this and have a proper pull
request. But this is good to go today.


Re: CB-6415 [Blackberry] unable to add platform, using custom or local library

Posted by Josh Soref <js...@blackberry.com>.
I wrote:
> BlackBerry has code in places which do a lot of `mixin` which would
>result
> in stuff like this working w/o requiring all the strange logic that¹s
> currently scattered through multiple files.
>
> I¹m going to probably try (unfortunately not until near the end of the
> month) replace the mess that¹s currently lying around w/ such mixin code,
> which should result in things being considerably cleaner.
>
> While we could land Martin¹s fix temporarily ‹ and then back it out
>later,
> I¹m not a big fan of lots of backouts/changes which aren¹t in the right
> direction.

https://github.com/blackberry/cordova-cli/tree/config_json_platform


I need to run the tests, but this is a PoC


Re: CB-6415 [Blackberry] unable to add platform, using custom or local library

Posted by Martin Gonzalez Glez <ma...@gmail.com>.
Agree, your config.json file it provides more properties. But in
blackberry10_parser, as well as in config.js or at lazy_load those
properties are completely ignored. According to those files, the most
important data to retrieve is the URL, and get the platform name to use it
with the platforms.js, in order to determine the url link (download if no
local library is found), subdir, and so.

Yes we should receive feedback from the community about this subject, but
well my fix like you said it only applies to the current model, if the
community is agree and disposed to add the other properties in the
config.json file and use them, we can add logic to the requirements check
to use those properties.


2014-04-08 17:13 GMT-05:00 Josh Soref <js...@blackberry.com>:

> Martin Gonzalez Glez wrote:
>
> >https://issues.apache.org/jira/browse/CB-6415
>
> SoŠ I was the one who tried to implement this thing.
>
> I probably failed to implement it the way something was expecting, but I
> implemented it the way I was expecting things to work.
>
> Before we spend time making changes, I¹m hoping someone can explain how
> they envision this to work.
>
> Personally, I expect .cordova/config.json:
> {
>         "lib": {
>                 "blackberry10": {
>                         "uri": "/tmp/blackberry10",
>                         "version": "dev²,
>                         "subdir": "",
>                         "id": "blackberry10"
>                 }
>         }
> }
>
> to overlay/mask other files such as platforms.js:
> module.exports = {
> Š
>     'blackberry10' : {
>         parser : './src/metadata/blackberry10_parser',
>         url    :
> 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
>         version: '3.4.0',
>         subdirectory: 'blackberry10'
>     },
> Š
>
> }
>
>
>
> Apparently, it doesn¹t because `subdir` from config.json is totally
> ignored.
>
>
> BlackBerry has code in places which do a lot of `mixin` which would result
> in stuff like this working w/o requiring all the strange logic that¹s
> currently scattered through multiple files.
>
> I¹m going to probably try (unfortunately not until near the end of the
> month) replace the mess that¹s currently lying around w/ such mixin code,
> which should result in things being considerably cleaner.
>
> While we could land Martin¹s fix temporarily ‹ and then back it out later,
> I¹m not a big fan of lots of backouts/changes which aren¹t in the right
> direction.
>
> Thoughts?
>
>

Re: CB-6415 [Blackberry] unable to add platform, using custom or local library

Posted by Josh Soref <js...@blackberry.com>.
Martin Gonzalez Glez wrote:

>https://issues.apache.org/jira/browse/CB-6415

SoŠ I was the one who tried to implement this thing.

I probably failed to implement it the way something was expecting, but I
implemented it the way I was expecting things to work.

Before we spend time making changes, I¹m hoping someone can explain how
they envision this to work.

Personally, I expect .cordova/config.json:
{
	"lib": {
		"blackberry10": {
			"uri": "/tmp/blackberry10",
			"version": "dev²,
			"subdir": "",
			"id": "blackberry10"
		}
	}
}

to overlay/mask other files such as platforms.js:
module.exports = {
Š
    'blackberry10' : {
	parser : './src/metadata/blackberry10_parser',
	url    : 
'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
	version: '3.4.0',
	subdirectory: 'blackberry10'
    },
Š

}



Apparently, it doesn¹t because `subdir` from config.json is totally
ignored.


BlackBerry has code in places which do a lot of `mixin` which would result
in stuff like this working w/o requiring all the strange logic that¹s
currently scattered through multiple files.

I¹m going to probably try (unfortunately not until near the end of the
month) replace the mess that¹s currently lying around w/ such mixin code,
which should result in things being considerably cleaner.

While we could land Martin¹s fix temporarily ‹ and then back it out later,
I¹m not a big fan of lots of backouts/changes which aren¹t in the right
direction.

Thoughts?