Skip to content

Fix NormalizeName for subpackage of unknown host - #487

Merged
mattfarina merged 1 commit into
Masterminds:masterfrom
hori-ryota:feature/fix-unknown-packageroot
Aug 3, 2016
Merged

Fix NormalizeName for subpackage of unknown host#487
mattfarina merged 1 commit into
Masterminds:masterfrom
hori-ryota:feature/fix-unknown-packageroot

Conversation

@hori-ryota

@hori-ryota hori-ryota commented Jun 22, 2016

Copy link
Copy Markdown
Contributor

When import unknown host package with sub, glide show following error.

when,

import:
- package: otherurl/example/root
  repo: git@otherurl:example/root.git
  vcs: git
  subpackages:
  - sub

then,

[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Fetching updates for otherurl/example/root/sub.
[WARN]  otherurl/example/root/sub appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[ERROR] Failed to set version on otherurl/example/root/sub to : Cannot detect VCS

Because getRootFromGoGet(pkg string) string method get https://otherurl/example/root/sub and it failed.

But, fetching root is success and cached in remotePackageCache, so compare prefix to cached packages.

Does this resolve #469 ?

@hori-ryota
hori-ryota force-pushed the feature/fix-unknown-packageroot branch from 8e6b4a6 to f5fab01 Compare June 22, 2016 21:37
@mattfarina

Copy link
Copy Markdown
Member

I'm pondering this approach and some deviations from it with semantic differences from it.

We have some cases in the past where something similar caused problems problems. I want to test those scenarios.

@hori-ryota

Copy link
Copy Markdown
Contributor Author

@mattfarina Can I have an example if there is a useless pattern?

@hori-ryota

Copy link
Copy Markdown
Contributor Author

@7imon7ays ping

@mattfarina

Copy link
Copy Markdown
Member

I ran some tests and found:

  • There is a performance improvement (less network calls)
  • Generated glide.lock files were equivalent.

@mattfarina
mattfarina merged commit 8843887 into Masterminds:master Aug 3, 2016
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

Successfully merging this pull request may close these issues.

Bitbucket and subpackages: Cannot detect VCS

2 participants