New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install closure-library (or any git repo at code.google.com) #746

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@tschaub
Copy link
Contributor

tschaub commented Aug 8, 2013

I'm trying to use Bower to grab closure-library. It looks like the library is registered with git://code.google.com/p/closure-library.git. This URL doesn't resolve to anything.

The Closure Library page says to git clone https://code.google.com/p/closure-library/.

So I've tried this in bower.json:

  "dependencies": {
    "closure-library": "https://code.google.com/p/closure-library/"
  }

It looks like the resolver factory (understandably) decides this is a job for the UrlResolver and index.html is downloaded from the site.

When I try to force the GitRemoteResolver I'm getting a failure:

  "dependencies": {
    "closure-library": "git+https://code.google.com/p/closure-library/"
  }
bower closure-library#*     not-cached https://code.google.com/p/closure-library.git#*
bower closure-library#*        resolve https://code.google.com/p/closure-library.git#*
bower closure-library#*       checkout master
bower closure-library#*        ECMDERR Failed to execute "git clone https://code.google.com/p/closure-library.git -b master --depth 1 --progress .", exit code of #128

This is because the GitRemoteResolver trims the slash and ensures that there is a trailing .git.

Should there be a config option to preserve URLs (without stripping / or adding .git)?

I imagine this is an issue with any code.google.com project using git.

@tschaub tschaub referenced this pull request Aug 8, 2013

Closed

Unregister package requests #120

@tschaub

This comment has been minimized.

Copy link
Contributor

tschaub commented Aug 8, 2013

And to add to the failures with git @ code.google.com, shallow clones don't work.

@satazor

This comment has been minimized.

Copy link
Member

satazor commented Aug 8, 2013

Yes this is not related with Bower appending .git but with --depth=1. I guess we will have to try without --depth on error. Let's keep this on #744 .

@satazor satazor closed this Aug 8, 2013

@tschaub

This comment has been minimized.

Copy link
Contributor

tschaub commented Aug 8, 2013

@satazor what do you think about a custom resolver for git @ google code? The change in 3a6a179 is more of a hack than it needs to be if the --depth issue can be dealt with separately (i.e. no need to override _checkout - I know this is not a clean way to handle this).

I can put together a clean pull request if you think this is the way to go.

@tschaub

This comment has been minimized.

Copy link
Contributor

tschaub commented Aug 8, 2013

To be clear, there are two issues here. If the --depth issue is dealt with separately (#744), using Google Code style URLs for git projects does not work with the GitRemoteResolver because of the removal of the trailing slash and the addition of the .git.

@tschaub

This comment has been minimized.

Copy link
Contributor

tschaub commented Aug 8, 2013

I take that back, confirmed things work with just the removal of --depth. Was getting timeouts before with git clone https://code.google.com/p/closure-library.git instead of git clone https://code.google.com/p/closure-library/.

@tschaub tschaub deleted the tschaub:git-google-code branch Aug 8, 2013

@satazor

This comment has been minimized.

Copy link
Member

satazor commented on 3a6a179 Aug 8, 2013

From which branch does this commit comes from?

This comment has been minimized.

Copy link
Contributor

tschaub replied Aug 8, 2013

I deleted the branch when I saw that the trailing .git was not causing an issue (I swear it was previously). Your fix works well for me. Thanks for that.

@satazor

This comment has been minimized.

Copy link
Member

satazor commented Aug 8, 2013

@tschaub I don't think we should create a specialised google code resolver unless there is a way to actually make it faster. That's why the specialised GitHub resolver exists. I will make a PR now with my solution.

@satazor

This comment has been minimized.

Copy link
Member

satazor commented Aug 8, 2013

Pending for review/opinions: #747

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