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

glide-report fails to find cached file due to incorrect result of dependency.Remote() #6

Open
dmitris opened this issue Feb 1, 2017 · 0 comments

Comments

@dmitris
Copy link

dmitris commented Feb 1, 2017

I'm getting failures of glide-report when there are repositories with custom aka "vanity" paths such as golang.org/x/crypto that require dynamic lookup.

Here's how to replicate:

go get github.com/dmitris/deptest
cd $GOPATH/src/github.com/dmitris/deptest
glide-report
  • the above may or may not work, but with the following I can force the error:
rm -fr ~/.glide/cache/
$ $GOPATH/bin/glide-report
[WARN]	Disclaimer, this report is to help highlight things to consider. It is
[WARN]	alpha software and the rules are still under consideration.
[INFO]	Reading glide.yaml file to understand configured versions and ranges
[INFO]	Reading glide.lock file to understand pinned revisions
[INFO]	Fetching dependency data, this may take a moment...
Report on .

------------------------------------------------------------------------------
Direct Imports
------------------------------------------------------------------------------

Analysis of golang.org/x/crypto:
● Dependency does not provide Semantic Version releases
[ERROR]	Unable to get cached repo data: open /Users/dmitris/.glide/cache/info/https-go.googlesource.com-crypto.json: no such file or directory

I believe this happens due to the logic in https://github.com/Masterminds/glide/blob/master/cfg/config.go#L470-L471 which just adds https:// to the Dependency's Name (d.Name) and does not do a dynamic lookup necessary for custom/vanity import paths such as "golang.org/x/crypto". #4 is possibly related (since it also mentiones a repo with custom import path).

I have a proposed PR for glide/cfg that fixes the issue (by adding a call to vcs.NewRepo which performs a dynamic lookup if needed) and will submit it in a moment.

dmitris added a commit to dmitris/glide that referenced this issue Feb 1, 2017
Fixes Masterminds/glide-report#6.
Added unit tests for Remote() function with packages
that require dynamic resolution.
dmitris added a commit to dmitris/glide that referenced this issue Aug 13, 2018
Fixes Masterminds/glide-report#6.
Added unit tests for Remote() function with packages
that require dynamic resolution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant