Skip to content
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 from
Closed

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

wants to merge 1 commit into from

Conversation

tschaub
Copy link
Contributor

@tschaub 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
Copy link
Contributor Author

tschaub commented Aug 8, 2013

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

@satazor
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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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 git-google-code branch August 8, 2013 19:49
@satazor
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
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
Labels
Development

Successfully merging this pull request may close these issues.

2 participants