FamousArchives / generator-famous

for those who hate doing things once
123 stars 26 forks source link

Fix bower.json #6

Closed polidore closed 10 years ago

polidore commented 10 years ago

Updating to use the git+https protocol and target the tag for famous instead of the branch. I think this is what you meant and it fixes my bower install.

MylesBorins commented 10 years ago

I just sat down to fix this problem and see that you have already done the heavy lifting!

Before we can accept any pull requests, we need to have a Contributor License Agreement on file, can you please send Andrew an email (andrew@famo.us) referencing this ticket so that I can send you a link to our CLA which you can sign online.

polidore commented 10 years ago

Thanks, I sent the email.

This doesn't completely fix it since bower / npm don't initialize git submodules. Might be better to just put these version in npm.

bp

MylesBorins commented 10 years ago

the end points that were are using are flattened repos with no submodules… so it shouldn't be a problem.

Thanks again!

On Apr 10, 2014, at 10:22 AM, Benjamin Polidore notifications@github.com wrote:

Thanks, I sent the email.

This doesn't completely fix it since bower / npm don't initialize git submodules. Might be better to just put these version in npm.

bp

— Reply to this email directly or view it on GitHub.

polidore commented 10 years ago

ah, ok. well, then this is incorrect since i'm pointing to the tag which doesn't have this flattened nature. I don't think you can point to an entire branch like this.

Couple alternatives: change it to point to a specific commit (seems flimsy?) or make a new tag.

MylesBorins commented 10 years ago

I just commented in line. We have a flattened branch. This is not the best solution long term, but works for now.

polidore commented 10 years ago

I think there is a bug in bower that requires the value after the hash to have the form [0-9].[0-9], etc. (so, not underscores)

See this:

https://github.com/isaacs/node-semver/blob/master/semver.js#L119

When I try to point at your branch, I get this exception due to a fail in semver.valid:

- famous Tag v0_1_1 is not a valid semver range/version or a valid commit hash

all it does is check that regex referenced above then blow up.

so, unbelievably, you'll have to create a new branch or tag with dots!!

MylesBorins commented 10 years ago

This works fine with bower pointing to a branch. Which is why we are using underscores instead of dots

If you change the reference it should work fine On Apr 10, 2014 11:05 AM, "Benjamin Polidore" notifications@github.com wrote:

I think there is a bug in bower that requires the value after the hash to have the form [0-9].[0-9], etc. (so, not underscores)

See this:

https://github.com/isaacs/node-semver/blob/master/semver.js#L119

When I try to point at your branch, I get this exception due to a fail in semver.valid:

  • famous Tag v0_1_1 is not a valid semver range/version or a valid commit hash

all it does is check that regex referenced above then blow up.

so, unbelievably, you'll have to create a new branch or tag with dots!!

Reply to this email directly or view it on GitHubhttps://github.com/Famous/generator-famous/pull/6#issuecomment-40118207 .

polidore commented 10 years ago

Have you tested this? I'm changing it, and it doesn't work. It's an issue with bower I think. See below from my system:

~/projects/famtest » grep git bower.json 
  "homepage": "https://github.com/polidore/famtest",
    "url": "http://github.com/polidore/"
    "famous-polyfills": "git+https://github.com/Famous/polyfills.git#0.1.1",
    "famous": "git+https://github.com/Famous/famous.git#v0_1_1"

~/projects/famtest » bower install                                                      
bower cloning https://github.com/Famous/polyfills.git
bower cloning https://github.com/Famous/famous.git
bower error Tag v0_1_1 is not a valid semver range/version or a valid commit hash
bower cached https://github.com/Famous/polyfills.git
bower fetching famous-polyfills
bower cached https://github.com/Famous/famous.git
bower fetching famous
bower cloning git://github.com/jrburke/requirejs-bower.git
bower cached git://github.com/jrburke/requirejs-bower.git
bower fetching requirejs
bower cloning git://github.com/jrburke/almond.git
bower cached git://github.com/jrburke/almond.git
bower fetching almond
bower checking out famous-polyfills#0.1.1
bower checking out almond#0.2.9
bower checking out requirejs#2.1.11
bower copying /home/bpolidor/.bower/cache/polyfills/b6b128dc5cbc20ca4334cb7faa7aff2f
bower copying /home/bpolidor/.bower/cache/requirejs/64c3d861bd88c012885cd73d2f0e6a53
bower copying /home/bpolidor/.bower/cache/almond/d7f63cbcd440cd735c44811163dcf0e9

There were errors, here's a summary of them:
- famous Tag v0_1_1 is not a valid semver range/version or a valid commit hash

~/projects/famtest » bower -v                                                           
0.10.0
MylesBorins commented 10 years ago

Oh wait! V0_1_1 is a git branch, not a tag. Which is why it is failing for http...

Let me think about this and talk to the team about how we are handling tags On Apr 10, 2014 11:24 AM, "Benjamin Polidore" notifications@github.com wrote:

Have you tested this? I'm changing it, and it doesn't work. It's an issue with bower I think. See below from my system:

~/projects/famtest >> grep git bower.json "homepage": "https://github.com/polidore/famtest", "url": "http://github.com/polidore/" "famous-polyfills": "git+https://github.com/Famous/polyfills.git#0.1.1", "famous": "git+https://github.com/Famous/famous.git#v0_1_1"

~/projects/famtest >> bower install bower cloning https://github.com/Famous/polyfills.git bower cloning https://github.com/Famous/famous.git bower error Tag v0_1_1 is not a valid semver range/version or a valid commit hash bower cached https://github.com/Famous/polyfills.git bower fetching famous-polyfills bower cached https://github.com/Famous/famous.git bower fetching famous bower cloning git://github.com/jrburke/requirejs-bower.git bower cached git://github.com/jrburke/requirejs-bower.git bower fetching requirejs bower cloning git://github.com/jrburke/almond.git bower cached git://github.com/jrburke/almond.git bower fetching almond bower checking out famous-polyfills#0.1.1 bower checking out almond#0.2.9 bower checking out requirejs#2.1.11 bower copying /home/bpolidor/.bower/cache/polyfills/b6b128dc5cbc20ca4334cb7faa7aff2f bower copying /home/bpolidor/.bower/cache/requirejs/64c3d861bd88c012885cd73d2f0e6a53 bower copying /home/bpolidor/.bower/cache/almond/d7f63cbcd440cd735c44811163dcf0e9

There were errors, here's a summary of them:

  • famous Tag v0_1_1 is not a valid semver range/version or a valid commit hash

~/projects/famtest >> bower -v 0.10.0

Reply to this email directly or view it on GitHubhttps://github.com/Famous/generator-famous/pull/6#issuecomment-40120493 .

polidore commented 10 years ago

Honestly, I think it would work if it had dots. It's not even trying to download. It's failing at a regex check in the place I linked.

On Thu, Apr 10, 2014 at 2:31 PM, Myles Borins notifications@github.comwrote:

Oh wait! V0_1_1 is a git branch, not a tag. Which is why it is failing for http...

Let me think about this and talk to the team about how we are handling tags On Apr 10, 2014 11:24 AM, "Benjamin Polidore" notifications@github.com wrote:

Have you tested this? I'm changing it, and it doesn't work. It's an issue with bower I think. See below from my system:

~/projects/famtest >> grep git bower.json "homepage": "https://github.com/polidore/famtest", "url": "http://github.com/polidore/" "famous-polyfills": "git+https://github.com/Famous/polyfills.git#0.1.1", "famous": "git+https://github.com/Famous/famous.git#v0_1_1"

~/projects/famtest >> bower install bower cloning https://github.com/Famous/polyfills.git bower cloning https://github.com/Famous/famous.git bower error Tag v0_1_1 is not a valid semver range/version or a valid commit hash bower cached https://github.com/Famous/polyfills.git bower fetching famous-polyfills bower cached https://github.com/Famous/famous.git bower fetching famous bower cloning git://github.com/jrburke/requirejs-bower.git bower cached git://github.com/jrburke/requirejs-bower.git bower fetching requirejs bower cloning git://github.com/jrburke/almond.git bower cached git://github.com/jrburke/almond.git bower fetching almond bower checking out famous-polyfills#0.1.1 bower checking out almond#0.2.9 bower checking out requirejs#2.1.11 bower copying /home/bpolidor/.bower/cache/polyfills/b6b128dc5cbc20ca4334cb7faa7aff2f bower copying /home/bpolidor/.bower/cache/requirejs/64c3d861bd88c012885cd73d2f0e6a53 bower copying /home/bpolidor/.bower/cache/almond/d7f63cbcd440cd735c44811163dcf0e9

There were errors, here's a summary of them:

  • famous Tag v0_1_1 is not a valid semver range/version or a valid commit hash

~/projects/famtest >> bower -v 0.10.0

Reply to this email directly or view it on GitHub< https://github.com/Famous/generator-famous/pull/6#issuecomment-40120493>

.

Reply to this email directly or view it on GitHubhttps://github.com/Famous/generator-famous/pull/6#issuecomment-40121385 .

MylesBorins commented 10 years ago

The current tag with dots is to the repo with submodules, which will also fail in a different way

I have been maintaining flattened orphan branches for each release which has allowed this pattern to work, but obviously it does not for those who don't have ssh keys setup

Thanks for finding this edge case! On Apr 10, 2014 11:33 AM, "Benjamin Polidore" notifications@github.com wrote:

Honestly, I think it would work if it had dots. It's not even trying to download. It's failing at a regex check in the place I linked.

On Thu, Apr 10, 2014 at 2:31 PM, Myles Borins <notifications@github.com

wrote:

Oh wait! V0_1_1 is a git branch, not a tag. Which is why it is failing for http...

Let me think about this and talk to the team about how we are handling tags On Apr 10, 2014 11:24 AM, "Benjamin Polidore" notifications@github.com wrote:

Have you tested this? I'm changing it, and it doesn't work. It's an issue with bower I think. See below from my system:

~/projects/famtest >> grep git bower.json "homepage": "https://github.com/polidore/famtest", "url": "http://github.com/polidore/" "famous-polyfills": "git+https://github.com/Famous/polyfills.git#0.1.1 ", "famous": "git+https://github.com/Famous/famous.git#v0_1_1"

~/projects/famtest >> bower install bower cloning https://github.com/Famous/polyfills.git bower cloning https://github.com/Famous/famous.git bower error Tag v0_1_1 is not a valid semver range/version or a valid commit hash bower cached https://github.com/Famous/polyfills.git bower fetching famous-polyfills bower cached https://github.com/Famous/famous.git bower fetching famous bower cloning git://github.com/jrburke/requirejs-bower.git bower cached git://github.com/jrburke/requirejs-bower.git bower fetching requirejs bower cloning git://github.com/jrburke/almond.git bower cached git://github.com/jrburke/almond.git bower fetching almond bower checking out famous-polyfills#0.1.1 bower checking out almond#0.2.9 bower checking out requirejs#2.1.11 bower copying /home/bpolidor/.bower/cache/polyfills/b6b128dc5cbc20ca4334cb7faa7aff2f bower copying /home/bpolidor/.bower/cache/requirejs/64c3d861bd88c012885cd73d2f0e6a53 bower copying /home/bpolidor/.bower/cache/almond/d7f63cbcd440cd735c44811163dcf0e9

There were errors, here's a summary of them:

  • famous Tag v0_1_1 is not a valid semver range/version or a valid commit hash

~/projects/famtest >> bower -v 0.10.0

Reply to this email directly or view it on GitHub< https://github.com/Famous/generator-famous/pull/6#issuecomment-40120493>

.

Reply to this email directly or view it on GitHub< https://github.com/Famous/generator-famous/pull/6#issuecomment-40121385> .

Reply to this email directly or view it on GitHubhttps://github.com/Famous/generator-famous/pull/6#issuecomment-40121505 .

MylesBorins commented 10 years ago

I made a new tag to famous/famous

Try updating your code to "famous": "git+https://github.com/Famous/famous.git#flat0.1.1" and it should work

stukennedy commented 10 years ago

I had to change bower.json with the following two lines

"famous": "git+https://github.com/Famous/famous.git#flat0.1.1",
"famous-polyfills": "git+https://github.com/Famous/polyfills.git#0.1.1"

it now builds properly for me.

polidore commented 10 years ago

That worked. Thank you. I have committed this to the PR if you want to merge this in.

MylesBorins commented 10 years ago

Would you be able to squash these into a single commit?

polidore commented 10 years ago

Squashed!

MylesBorins commented 10 years ago

@polidore would you be able to sign this CLA https://famo.us/cla/individual we ended up having to change a few things since the first one you signed. thanks!!!

polidore commented 10 years ago

all set.

On Sun, Apr 27, 2014 at 8:46 PM, Myles Borins notifications@github.comwrote:

@polidore https://github.com/polidore would you be able to sign this CLA https://famo.us/cla/individual we ended up having to change a few things since the first one you signed. thanks!!!

— Reply to this email directly or view it on GitHubhttps://github.com/Famous/generator-famous/pull/6#issuecomment-41515147 .