Prereleases in semver ranges with Git endpoints aren't ignored #1017

Closed
donaldpipowitch opened this Issue Dec 17, 2013 · 22 comments

Comments

Projects
None yet
@donaldpipowitch

Hi,

I don't know if this is the expected behavior, but I think this is wrong. Say I have the following dependency:

"dependencies": {
    "angular": "https://github.com/angular/bower-angular.git#1.2.*"
  }

(I know Angular is a registered bower package, but let us suppose it would be just a Git repo.)
I have Angular 1.2.3 installed, but I know there is the new version 1.2.5 so I run bower update. But instead of getting 1.2.5 I get 1.2.6-build.1993+sha.2f91cfd.

Is this a bug (or a feature)?

@explunit

This comment has been minimized.

Show comment
Hide comment
@explunit

explunit Dec 18, 2013

Based on #782 I think this behavior is a bug

Based on #782 I think this behavior is a bug

@donaldpipowitch

This comment has been minimized.

Show comment
Hide comment
@donaldpipowitch

donaldpipowitch Dec 18, 2013

Some hours after I posted this I found this post about Angular how you should use these prereleases. Another indicator that this is a bug.

From the semver spec:
"A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version."

Some hours after I posted this I found this post about Angular how you should use these prereleases. Another indicator that this is a bug.

From the semver spec:
"A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version."

@explunit explunit referenced this issue in angular/angular.js Dec 18, 2013

Closed

angular-bower publishing unreleased versions #5459

@IgorMinar

This comment has been minimized.

Show comment
Hide comment
@IgorMinar

IgorMinar Dec 18, 2013

I got the same report via twitter. See the discussion under: https://twitter.com/IgorMinar/status/413013555219537921

I've confirmed that when defining the angular dependency as "angular": "~1.2" I'm getting pre-release builds.

bower version: 1.2.8

I got the same report via twitter. See the discussion under: https://twitter.com/IgorMinar/status/413013555219537921

I've confirmed that when defining the angular dependency as "angular": "~1.2" I'm getting pre-release builds.

bower version: 1.2.8

@eddiemonge eddiemonge referenced this issue in yeoman/generator-angular Dec 18, 2013

Closed

How should we handle AngularJS pre-releases? #512

@clakech

This comment has been minimized.

Show comment
Hide comment

clakech commented Dec 18, 2013

👍

@lvbreda

This comment has been minimized.

Show comment
Hide comment
@lvbreda

lvbreda Dec 18, 2013

I do also confirm the finding @IgorMinar posted. Had this issue today moving my project.

lvbreda commented Dec 18, 2013

I do also confirm the finding @IgorMinar posted. Had this issue today moving my project.

@knalli knalli referenced this issue in angular-translate/angular-translate Dec 18, 2013

Closed

Promote angular dependency to angular#~1.2.0 #261

@blackjid

This comment has been minimized.

Show comment
Hide comment

👍

@ojacquemart

This comment has been minimized.

Show comment
Hide comment

👍

@satazor

This comment has been minimized.

Show comment
Hide comment
@satazor

satazor Dec 18, 2013

Member

Pre-releases are only "ignored" when matching against *, that is, when installing without a specific version (bower install angular). Other than that, the normal semver rules will apply. See: https://github.com/bower/bower/blob/master/lib/util/semver.js#L27

We can change the behavior easily there. Opinions?

Member

satazor commented Dec 18, 2013

Pre-releases are only "ignored" when matching against *, that is, when installing without a specific version (bower install angular). Other than that, the normal semver rules will apply. See: https://github.com/bower/bower/blob/master/lib/util/semver.js#L27

We can change the behavior easily there. Opinions?

@JGarrido

This comment has been minimized.

Show comment
Hide comment

👍

@IgorMinar

This comment has been minimized.

Show comment
Hide comment
@IgorMinar

IgorMinar Dec 18, 2013

Sounds right to me.

Keep in mind that it should still be possible to get pre-release builds if
the expression explicitly matches the pre-release version string.

e.g. it is desirable to be able to get the latest pre-release build for
1.2.x if I specify this explicitly:

"dependencies": {
    "angular": "1.2.*-build-*"
}

On Wed, Dec 18, 2013 at 1:56 PM, André Cruz notifications@github.comwrote:

Pre-releases are only "ignored" when matching against *, that is, when
installing without a specific version (bower install angular). Other than
that, the normal semver rules will apply. See:
https://github.com/bower/bower/blob/master/lib/util/semver.js#L27

We can change the behavior easily there. Opinions?


Reply to this email directly or view it on GitHubhttps://github.com/bower/bower/issues/1017#issuecomment-30884894
.

Sounds right to me.

Keep in mind that it should still be possible to get pre-release builds if
the expression explicitly matches the pre-release version string.

e.g. it is desirable to be able to get the latest pre-release build for
1.2.x if I specify this explicitly:

"dependencies": {
    "angular": "1.2.*-build-*"
}

On Wed, Dec 18, 2013 at 1:56 PM, André Cruz notifications@github.comwrote:

Pre-releases are only "ignored" when matching against *, that is, when
installing without a specific version (bower install angular). Other than
that, the normal semver rules will apply. See:
https://github.com/bower/bower/blob/master/lib/util/semver.js#L27

We can change the behavior easily there. Opinions?


Reply to this email directly or view it on GitHubhttps://github.com/bower/bower/issues/1017#issuecomment-30884894
.

@donaldpipowitch

This comment has been minimized.

Show comment
Hide comment
@donaldpipowitch

donaldpipowitch Dec 19, 2013

I'm with @IgorMinar: Prereleases should be a strict opt-in. 1.2.* should update to 1.2.1, 1.2.2 , 1.2.3 and so on and 1.2.*-build.* should update to 1.2.1, 1.2.2-build.1, 1.2.2-build.2, 1.2.2, 1.2.3-build.1, etc.

I'm with @IgorMinar: Prereleases should be a strict opt-in. 1.2.* should update to 1.2.1, 1.2.2 , 1.2.3 and so on and 1.2.*-build.* should update to 1.2.1, 1.2.2-build.1, 1.2.2-build.2, 1.2.2, 1.2.3-build.1, etc.

@nicoinch

This comment has been minimized.

Show comment
Hide comment

👍

@cesarandreu

This comment has been minimized.

Show comment
Hide comment
@cesarandreu

cesarandreu Dec 19, 2013

👍 To this. It's breaking my CircleCI deployment for some reason.

👍 To this. It's breaking my CircleCI deployment for some reason.

@cesarandreu cesarandreu referenced this issue in angular/angular.js Dec 19, 2013

Closed

Bower crashes with 1.2.6 #5413

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Dec 31, 2013

Contributor

This is definitely a bug. We have problems with those versions at tenex/rails-assets#92

Please exclude pre-releases from being installed by bower.

Contributor

sheerun commented Dec 31, 2013

This is definitely a bug. We have problems with those versions at tenex/rails-assets#92

Please exclude pre-releases from being installed by bower.

sheerun added a commit to sheerun/bower that referenced this issue Dec 31, 2013

sheerun added a commit to sheerun/bower that referenced this issue Dec 31, 2013

@satazor

This comment has been minimized.

Show comment
Hide comment
Member

satazor commented Dec 31, 2013

@IgorMinar

This comment has been minimized.

Show comment
Hide comment
@IgorMinar

IgorMinar Jan 2, 2014

can you clarify? I still see the issue.

On Tue Dec 31 2013 at 8:07:19 AM, André Cruz notifications@github.com
wrote:

Looks good now

[image: :shipit:]

@wibblymat https://github.com/wibblymat @svnltohttps://github.com/svnlto
@sindresorhus https://github.com/sindresorhus


Reply to this email directly or view it on GitHubhttps://github.com/bower/bower/issues/1017#issuecomment-31399963
.

can you clarify? I still see the issue.

On Tue Dec 31 2013 at 8:07:19 AM, André Cruz notifications@github.com
wrote:

Looks good now

[image: :shipit:]

@wibblymat https://github.com/wibblymat @svnltohttps://github.com/svnlto
@sindresorhus https://github.com/sindresorhus


Reply to this email directly or view it on GitHubhttps://github.com/bower/bower/issues/1017#issuecomment-31399963
.

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Jan 2, 2014

Contributor

@IgorMinar It's about my Pull Request.

Contributor

sheerun commented Jan 2, 2014

@IgorMinar It's about my Pull Request.

@IgorMinar

This comment has been minimized.

Show comment
Hide comment
@IgorMinar

IgorMinar Jan 8, 2014

oh I see. email notifications don't contain PR/commit updates.

if it works, can we get that merged and released?

oh I see. email notifications don't contain PR/commit updates.

if it works, can we get that merged and released?

@silentworks

This comment has been minimized.

Show comment
Hide comment
@silentworks

silentworks Jan 12, 2014

Can someone clarify if this has been fixed?

Can someone clarify if this has been fixed?

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Jan 13, 2014

Contributor

No. We're waiting 2 weeks now for accepting PR.

Contributor

sheerun commented Jan 13, 2014

No. We're waiting 2 weeks now for accepting PR.

@evil-shrike

This comment has been minimized.

Show comment
Hide comment
@evil-shrike

evil-shrike Jan 16, 2014

This behavior puzzled me. I had a git-repo with pre-release vesions (0.1-SNAPSHOT-XXX). bower install installed the latest version. bower update updated to the latest version. Everything went good. Then I published a release version "0.1" and continued pushing shapshots of the next version (0.2-SNAPSHOT-XXX). Now bower install installs only 0.1 and ignores 0.2s. This is very confusing. bower update does nothing.

How can I install the most latest version now???

I'd suggest to introduce a flag "--includePrerelase" or a reverse one - "--skipPrelease".

I think bower's behavior for installing prerelease versions should not depend on repo's content/tags/etc. The behavior should only depend on explicit arguments.

This behavior puzzled me. I had a git-repo with pre-release vesions (0.1-SNAPSHOT-XXX). bower install installed the latest version. bower update updated to the latest version. Everything went good. Then I published a release version "0.1" and continued pushing shapshots of the next version (0.2-SNAPSHOT-XXX). Now bower install installs only 0.1 and ignores 0.2s. This is very confusing. bower update does nothing.

How can I install the most latest version now???

I'd suggest to introduce a flag "--includePrerelase" or a reverse one - "--skipPrelease".

I think bower's behavior for installing prerelease versions should not depend on repo's content/tags/etc. The behavior should only depend on explicit arguments.

@wibblymat wibblymat closed this in 40dbb0f Jan 20, 2014

wibblymat added a commit that referenced this issue Jan 20, 2014

Merge pull request #1029 from sheerun/semver
Ignore prerelease versions if possible, fixes #1017
@IgorMinar

This comment has been minimized.

Show comment
Hide comment

yay!

@sheerun sheerun referenced this issue in tenex/rails-assets Feb 28, 2014

Closed

Add support for Bowerfile #121

@jamesplease jamesplease referenced this issue in marionettejs/backbone.marionette May 12, 2014

Closed

jQuery 2.1.1 #1303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment