Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Dep ensure contains malformed code for version module #2154

Closed
jinlianch opened this issue May 7, 2019 · 3 comments
Closed

Dep ensure contains malformed code for version module #2154

jinlianch opened this issue May 7, 2019 · 3 comments

Comments

@jinlianch
Copy link

jinlianch commented May 7, 2019

What version of dep are you using (dep version)?

dep:
version : devel
build date :
git hash :
go version : go1.12.3
go compiler : gc
platform : darwin/amd64
features : ImportDuringSolve=false

git describe --tags: v0.5.1-3-g66ec1e8

What dep command did you run?

dep ensure -add github.com/elastic/[email protected]

What did you expect to see?

Install go-elasticsearch of 7.0.0 version successfully.
If I use command dep ensure -add github.com/elastic/go-elasticsearch, it will get github.com/elastic/[email protected], not the latest release.

What did you see instead?

Fetching sources...

Solving failure: No versions of github.com/elastic/go-elasticsearch met constraints:
v0.0.0: Could not introduce github.com/elastic/[email protected], as it is not allowed by constraint ^7.0.0 from project Rigel/go.
v7.0.0: "github.com/elastic/go-elasticsearch" imports "github.com/elastic/go-elasticsearch/v7/esapi", which contains malformed code: unknown error for "github.com/elastic/go-elasticsearch/v7/esapi", if you get this error see #351
v6.7.0: Could not introduce github.com/elastic/[email protected], as it is not allowed by constraint ^7.0.0 from project Rigel/go.
v5.6.0: Could not introduce github.com/elastic/[email protected], as it is not allowed by constraint ^7.0.0 from project Rigel/go.
v7.0.0-rc1: Could not introduce github.com/elastic/[email protected], as it is not allowed by constraint ^7.0.0 from project Rigel/go.
master: Could not introduce github.com/elastic/go-elasticsearch@master, as it is not allowed by constraint ^7.0.0 from project Rigel/go.
5.x: Could not introduce github.com/elastic/[email protected], as it is not allowed by constraint ^7.0.0 from project Rigel/go.
6.x: Could not introduce github.com/elastic/[email protected], as it is not allowed by constraint ^7.0.0 from project Rigel/go.
7.x: Could not introduce github.com/elastic/[email protected], as it is not allowed by constraint ^7.0.0 from project Rigel/go.
old: Could not introduce github.com/elastic/go-elasticsearch@old, as it is not allowed by constraint ^7.0.0 from project Rigel/go.
travis: Could not introduce github.com/elastic/go-elasticsearch@travis, as it is not allowed by constraint ^7.0.0 from project Rigel/go.
xpack: Could not introduce github.com/elastic/go-elasticsearch@xpack, as it is not allowed by constraint ^7.0.0 from project Rigel/go.

Seems it's caused by the package use go module to generate a specify module name, so it can't import the package.
It's there a way to fix this?

@kevinburke
Copy link
Collaborator

I think #1963 will address this, I may have time to review that PR today (to see if it answers your question first, as well).

@AlekSi
Copy link
Contributor

AlekSi commented May 9, 2019

@kevinburke That would be really nice! 🙏

@mvdan
Copy link
Member

mvdan commented Sep 4, 2020

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!

@mvdan mvdan closed this as completed Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants