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

Suggestion: Add flag to disable "auto subpackage resolving" #1063

Open
lorenmh opened this issue Nov 25, 2019 · 0 comments
Open

Suggestion: Add flag to disable "auto subpackage resolving" #1063

lorenmh opened this issue Nov 25, 2019 · 0 comments

Comments

@lorenmh
Copy link

lorenmh commented Nov 25, 2019

I am trying to install github.com/elastic/go-elasticsearch, which uses go modules. In their go.mod file, they name their package github.com/elastic/go-elasticsearch/v7 (note the added v7 for namespacing).

However, this does not work with glide.

When I try to get glide to install github.com/elastic/go-elasticsearch to vendor/github.com/elastic/go-elasticsearch/v7 (note the v7 in the install path), with the following in glide.yaml:

- package: github.com/elastic/go-elasticsearch/v7
  repo: [email protected]:elastic/go-elasticsearch
  version: v7.4.1

This magically is changed to the following in the glide.lock:

- name: github.com/elastic/go-elasticsearch
  version: d8acaa5faade05290d8b500b8f3892a378f2d2e7
  repo: [email protected]:elastic/go-elasticsearch
  subpackages:
  - v7

However, I do not want the name to change. I want it to stay as github.com/elastic/go-elasticsearch/v7. Ie, I want the following in my glide.lock:

- name: github.com/elastic/go-elasticsearch/v7
  version: d8acaa5faade05290d8b500b8f3892a378f2d2e7
  repo: [email protected]:elastic/go-elasticsearch

Suggestion: please allow us to disable the automatic path-to-subpackage behavior. Ie, maybe the following glide.yaml should keep the name field the same in the lock file:

- package: github.com/elastic/go-elasticsearch/v7
  repo: [email protected]:elastic/go-elasticsearch
  version: v7.4.1
  subpackages: []

or

- package: github.com/elastic/go-elasticsearch/v7
  repo: [email protected]:elastic/go-elasticsearch
  version: v7.4.1
  auto_subpackage_resolution: false
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