You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Vladimir Kotikov (Akvelon)" <v-...@microsoft.com> on 2015/07/08 16:28:17 UTC

RE: [DISCUSS] Dropping the -dev suffix

Hey, guys.

I've found another reason to drop this while testing cordova-lib with updated dependencies (see https://issues.apache.org/jira/browse/CB-9332)

It appears, that starting from 4.x.x semver treats prerelease versions in a very different way.
For example:

    require('semver').satisfies('5.1.0-dev', '>=0.10.0')   // true with semver@2
    require('semver').satisfies('5.1.0-dev', '>=0.10.0')   // false with semver@4

For more details see https://github.com/npm/node-semver#prerelease-tags and http://blog.npmjs.org/post/98131109725/npm-2-0-0

As a result of updating semver without removing -dev we'll get a lot of issues with plugins that has engine tags, referencing our tools.

So I think there are 3 options for us:
1. migrate to semver@4 and drop -dev suffix
2. leave all as is and don't update semver dependency
3. update semver, leave -dev suffix, and add a workaround for engines check (for example strip out -dev suffix while checking engines)

Any thoughts?

---------------
Best regards, Vladimir

-----Original Message-----
From: Jesse [mailto:purplecabbage@gmail.com] 
Sent: Thursday, 14 May, 2015 20:42
To: dev@cordova.apache.org
Subject: Re: [DISCUSS] Dropping the -dev suffix

I agree we should keep it, at least for the time being.
There is code in coho that manipulates all the versions in different branches when we do releases, changing it would mean we need to update all of that coho logic also.  Granted, coho releases would be simpler without the suffix, however, I don't think it is currently worth the change.

@purplecabbage
risingj.com

On Thu, May 14, 2015 at 10:35 AM, Nikhil Khandelwal <ni...@microsoft.com>
wrote:

> Now that we know how to fix the plugin to work with 'dev' versions of 
> platforms, we could keep the 'dev' suffix. It's somewhat useful for 
> anyone using our 'master' branch (I'm hoping its mostly the dev team) 
> and adding the platform and have the dev prefix listed here:
>
> λ cordova platform ls
> Installed platforms: android 4.1.0-dev, ios 3.8.0, windows 4.0.0-dev, 
> wp8 Available platforms: amazon-fireos, blackberry10, browser, 
> firefoxos,
> windows8
>
> Thanks,
> Nikhil
>
>
> -----Original Message-----
> From: Jesse [mailto:purplecabbage@gmail.com]
> Sent: Wednesday, May 13, 2015 4:39 PM
> To: dev@cordova.apache.org
> Subject: Re: [DISCUSS] Dropping the -dev suffix
>
> So back to the initial discussion, should we keep our -dev suffixes?
> If so we need to be sure to use engine tags like '>=4.0' or if you 
> specifically want to force a specific min patch, and still allow the 
> dev suffix, you can do '>=4.0.0--'
>
> And of course this should be documented.
>
>
> @purplecabbage
> risingj.com
>
> On Wed, May 13, 2015 at 4:21 PM, Jesse <pu...@gmail.com> wrote:
>
> > Yes, I just verified the same.
> >
> > Changing the plugin.xml engine to :
> > cordova-wp8 >=4.0.0-- will allow install for both wp8@4.0.0 and 
> > wp8@4.0.0-dev
> >
> > @purplecabbage
> > risingj.com
> >
> > On Wed, May 13, 2015 at 4:18 PM, Tim Barham 
> > <Ti...@microsoft.com>
> > wrote:
> >
> >> No, you were correct - any sort of pre-release identifier makes the 
> >> version less than the version without the pre-release identifier 
> >> (since it signifies a pre-release).
> >>
> >> Hence '4.0.0-dev', '4.0.0-alpha', '4.0.0-0.0.1' and 
> >> '4.0.0-iwishiwasarealreease' are all < 4.0.0.
> >>
> >> It seems to me the problem is with the plugin since it requires
> >> cordova-wp8 >=4.0.0, and there is no cordova-wp8 release (or yet to 
> >> be released version on github) that satisfies that requirement.
> >>
> >> ________________________________________
> >> From: So, Byoungro <by...@intel.com>
> >> Sent: Thursday, May 14, 2015 3:39 AM
> >> To: dev@cordova.apache.org
> >> Subject: RE: [DISCUSS] Dropping the -dev suffix
> >>
> >> Sorry, I got the other way around. :) 4.0.0-dev is > 4.0.0.
> >>
> >> Byoungro So
> >> SSG / DPD / Mobile Computing and Compilers Intel Corporation
> >>
> >> -----Original Message-----
> >> From: So, Byoungro
> >> Sent: Wednesday, May 13, 2015 10:37 AM
> >> To: dev@cordova.apache.org
> >> Subject: RE: [DISCUSS] Dropping the -dev suffix
> >>
> >> Semver should be able to understand '4.0.0-dev' as the valid 
> >> version string.
> >> There could be some other requirement problems, like <=, >.
> >> For example, 4.0.0-dev is < 4.0.0.
> >> So, if the requirement is >=4.0.0, then the version string '4.0.0-dev'
> >> will fail to satisfy the requirement.
> >>
> >> Byoungro So
> >> SSG / DPD / Mobile Computing and Compilers Intel Corporation
> >>
> >> -----Original Message-----
> >> From: Steven Gill [mailto:stevengill97@gmail.com]
> >> Sent: Wednesday, May 13, 2015 10:21 AM
> >> To: dev@cordova.apache.org
> >> Subject: [DISCUSS] Dropping the -dev suffix
> >>
> >> Recently, a issue (CB-9021) popped up where mobile spec was failing 
> >> because the semver check failed on a platform due to `-dev` being 
> >> in the version and not valid.
> >>
> >> I think we should remove -dev from our versions. Right now, after 
> >> we do a release, we add -dev to show that the repo is in 
> >> development and hasn't been released. I think we can accomplish the 
> >> same by just bumping the version (minor?) in the package.json and 
> >> just know it isn't released by seeing what is published on npm.
> >>
> >> Thoughts?
> >>
> >> -------------------------------------------------------------------
> >> -- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> >> For additional commands, e-mail: dev-help@cordova.apache.org
> >>
> >>
> >> -------------------------------------------------------------------
> >> -- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> >> For additional commands, e-mail: dev-help@cordova.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>

RE: [DISCUSS] Dropping the -dev suffix

Posted by Nikhil Khandelwal <ni...@microsoft.com>.
As a committer working on the master branch using npm link, it has been useful to have '-dev' prefix and do a "cordova --version".

I vote for (3). 

Thanks,
Nikhil


-----Original Message-----
From: Vladimir Kotikov (Akvelon) [mailto:v-vlkoti@microsoft.com] 
Sent: Wednesday, July 8, 2015 7:28 AM
To: dev@cordova.apache.org
Subject: RE: [DISCUSS] Dropping the -dev suffix

Hey, guys.

I've found another reason to drop this while testing cordova-lib with updated dependencies (see https://issues.apache.org/jira/browse/CB-9332)

It appears, that starting from 4.x.x semver treats prerelease versions in a very different way.
For example:

    require('semver').satisfies('5.1.0-dev', '>=0.10.0')   // true with semver@2
    require('semver').satisfies('5.1.0-dev', '>=0.10.0')   // false with semver@4

For more details see https://github.com/npm/node-semver#prerelease-tags and http://blog.npmjs.org/post/98131109725/npm-2-0-0

As a result of updating semver without removing -dev we'll get a lot of issues with plugins that has engine tags, referencing our tools.

So I think there are 3 options for us:
1. migrate to semver@4 and drop -dev suffix 2. leave all as is and don't update semver dependency 3. update semver, leave -dev suffix, and add a workaround for engines check (for example strip out -dev suffix while checking engines)

Any thoughts?

---------------
Best regards, Vladimir

-----Original Message-----
From: Jesse [mailto:purplecabbage@gmail.com]
Sent: Thursday, 14 May, 2015 20:42
To: dev@cordova.apache.org
Subject: Re: [DISCUSS] Dropping the -dev suffix

I agree we should keep it, at least for the time being.
There is code in coho that manipulates all the versions in different branches when we do releases, changing it would mean we need to update all of that coho logic also.  Granted, coho releases would be simpler without the suffix, however, I don't think it is currently worth the change.

@purplecabbage
risingj.com

On Thu, May 14, 2015 at 10:35 AM, Nikhil Khandelwal <ni...@microsoft.com>
wrote:

> Now that we know how to fix the plugin to work with 'dev' versions of 
> platforms, we could keep the 'dev' suffix. It's somewhat useful for 
> anyone using our 'master' branch (I'm hoping its mostly the dev team) 
> and adding the platform and have the dev prefix listed here:
>
> λ cordova platform ls
> Installed platforms: android 4.1.0-dev, ios 3.8.0, windows 4.0.0-dev,
> wp8 Available platforms: amazon-fireos, blackberry10, browser, 
> firefoxos,
> windows8
>
> Thanks,
> Nikhil
>
>
> -----Original Message-----
> From: Jesse [mailto:purplecabbage@gmail.com]
> Sent: Wednesday, May 13, 2015 4:39 PM
> To: dev@cordova.apache.org
> Subject: Re: [DISCUSS] Dropping the -dev suffix
>
> So back to the initial discussion, should we keep our -dev suffixes?
> If so we need to be sure to use engine tags like '>=4.0' or if you 
> specifically want to force a specific min patch, and still allow the 
> dev suffix, you can do '>=4.0.0--'
>
> And of course this should be documented.
>
>
> @purplecabbage
> risingj.com
>
> On Wed, May 13, 2015 at 4:21 PM, Jesse <pu...@gmail.com> wrote:
>
> > Yes, I just verified the same.
> >
> > Changing the plugin.xml engine to :
> > cordova-wp8 >=4.0.0-- will allow install for both wp8@4.0.0 and 
> > wp8@4.0.0-dev
> >
> > @purplecabbage
> > risingj.com
> >
> > On Wed, May 13, 2015 at 4:18 PM, Tim Barham 
> > <Ti...@microsoft.com>
> > wrote:
> >
> >> No, you were correct - any sort of pre-release identifier makes the 
> >> version less than the version without the pre-release identifier 
> >> (since it signifies a pre-release).
> >>
> >> Hence '4.0.0-dev', '4.0.0-alpha', '4.0.0-0.0.1' and 
> >> '4.0.0-iwishiwasarealreease' are all < 4.0.0.
> >>
> >> It seems to me the problem is with the plugin since it requires
> >> cordova-wp8 >=4.0.0, and there is no cordova-wp8 release (or yet to 
> >> be released version on github) that satisfies that requirement.
> >>
> >> ________________________________________
> >> From: So, Byoungro <by...@intel.com>
> >> Sent: Thursday, May 14, 2015 3:39 AM
> >> To: dev@cordova.apache.org
> >> Subject: RE: [DISCUSS] Dropping the -dev suffix
> >>
> >> Sorry, I got the other way around. :) 4.0.0-dev is > 4.0.0.
> >>
> >> Byoungro So
> >> SSG / DPD / Mobile Computing and Compilers Intel Corporation
> >>
> >> -----Original Message-----
> >> From: So, Byoungro
> >> Sent: Wednesday, May 13, 2015 10:37 AM
> >> To: dev@cordova.apache.org
> >> Subject: RE: [DISCUSS] Dropping the -dev suffix
> >>
> >> Semver should be able to understand '4.0.0-dev' as the valid 
> >> version string.
> >> There could be some other requirement problems, like <=, >.
> >> For example, 4.0.0-dev is < 4.0.0.
> >> So, if the requirement is >=4.0.0, then the version string '4.0.0-dev'
> >> will fail to satisfy the requirement.
> >>
> >> Byoungro So
> >> SSG / DPD / Mobile Computing and Compilers Intel Corporation
> >>
> >> -----Original Message-----
> >> From: Steven Gill [mailto:stevengill97@gmail.com]
> >> Sent: Wednesday, May 13, 2015 10:21 AM
> >> To: dev@cordova.apache.org
> >> Subject: [DISCUSS] Dropping the -dev suffix
> >>
> >> Recently, a issue (CB-9021) popped up where mobile spec was failing 
> >> because the semver check failed on a platform due to `-dev` being 
> >> in the version and not valid.
> >>
> >> I think we should remove -dev from our versions. Right now, after 
> >> we do a release, we add -dev to show that the repo is in 
> >> development and hasn't been released. I think we can accomplish the 
> >> same by just bumping the version (minor?) in the package.json and 
> >> just know it isn't released by seeing what is published on npm.
> >>
> >> Thoughts?
> >>
> >> -------------------------------------------------------------------
> >> -- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> >> For additional commands, e-mail: dev-help@cordova.apache.org
> >>
> >>
> >> -------------------------------------------------------------------
> >> -- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> >> For additional commands, e-mail: dev-help@cordova.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
 ] ][  X  ܚX P ܙݘK \X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 ] Z[ ܙݘK \X K ܙ B

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org