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

This package is broken with Go modules #546

Closed
mcandre opened this issue Nov 11, 2019 · 5 comments
Closed

This package is broken with Go modules #546

mcandre opened this issue Nov 11, 2019 · 5 comments

Comments

@mcandre
Copy link

mcandre commented Nov 11, 2019

Go modules requires packages beyond release versions 1.x to end Go import paths in slash /v<major> notation. But this package is structured for earlier Go versions using a dot .v<major> notation.

@laverya
Copy link
Contributor

laverya commented Nov 11, 2019

gopkg.in is an exception - packages there can use paths like gopkg.in/yaml.v3 instead of /. It's mentioned in this blog post.

What command are you seeing fail?

@mcandre
Copy link
Author

mcandre commented Nov 11, 2019

Update:

I suspect a local proxy configuration issue may be impacting this behavior on my machine. I'll get back to you.

@dmitris
Copy link

dmitris commented Nov 12, 2019

I'm finding it currently impossible to add a replace in go.mod to use an alternative location (such as internal mirror) - go mod download and godoc fail with: gopkg.in/yaml.v2 => git.xzcompany.com/gitmirror/go-yaml--yaml v2.2.2+incompatible fails with invalid version: +incompatible suffix not allowed: major version v0 is compatible. However, removing +incompatible makes things even worse - now go install fails due to version 2:

version "v2.2.2" invalid: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

😢

@farrellit
Copy link

FWIW I've been using this with go modules and go 1.13 in a new project in the last weeks and it's working fine .

@niemeyer
Copy link
Contributor

Issue doesn't seem related to go-yaml itself.

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

5 participants