-
Notifications
You must be signed in to change notification settings - Fork 28
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
dep: unable to solve the dependency graph / mod: error loading module requirements #10
Comments
A known issue is that this repo is at V2 and has interesting behaviour with go.mod, so as a fix I made the main branch V2 which I think may affect dep. I would like to rebase it and make master the main branch but I need to merge all the outstanding PRs before this can happen - this should fix this. I would note however that this repo guarantees compatibility with the go module system only so YMMV with dep. |
Looks like it is an upstream bug golang/dep#1962, golang/dep#2139
https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher |
I'm not sure @dillon-giacoppo how modules should work better, I do get following result Could you please elaborate how this should work as a module? |
if I try to forcefully load the latest module I get the following error:
I believe your module setup @dillon-giacoppo is broken If I start from scratch it only resolves up to 1.2.0
|
Please checkout my previous comment and attached tickets, dep is not compatible with go modules that use tags to do major versioning (single master branch). This is because the pseudo major version in the module path does not correspond to an actual directory. v1 works because it does not go looking for a v1/ directory. Modules are now the official way to do dependency management so I don't plan on supporting dep. |
I understand @dillon-giacoppo your point that dep is not supported but you are using module. Please see above error message that is related to module usage, not dep |
Can you please give steps to reproduce. i.e go version, exact command run etc. |
compiled a FROM golang:1.12
WORKDIR /src
RUN echo 'package main\n\
import "github.com/atlassian/go-artifactory/artifactory"\n\
func main() { artifactory.NewClient(client, nil) }\n' > test.go
RUN go mod init test
# also try this:
# RUN go get github.com/atlassian/go-artifactory@v2.3.0
RUN go build . Try the commented statement too, see how module is unable to resolve the latest version |
You are trying to use a major version >= 2 without adding a v2 to the module path. The correct Dockerfile would be FROM golang:1.12
WORKDIR /src
RUN echo 'package main\n\
import "github.com/atlassian/go-artifactory/v2/artifactory"\n\
func main() { artifactory.NewClient("", nil) }\n' > test.go
RUN go mod init test
# RUN go get github.com/atlassian/go-artifactory/v2 @v2.3.0
RUN go build . The examples also have correct usage. |
I encountered the same problem, really difficult to use, simply unable to install the latest version of the package, directly give up. |
Describe the bug
When I try to include this library, dep errors because of malformed code
To Reproduce
Expected behavior
to resolve this library
Log Output
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: