patterngoMajor
What does 'incompatible' in go.mod mean, will it cause harm?
Viewed 0 times
incompatiblemoddoesmeanwillcauseharmwhat
Problem
I'm using goczmq in my project, something like next:
main.go:
And more, I'm using golang 1.12 with gomod to manage my project.
See next, I use
go.mod:
From some discussion (for other library), e.g. this, it seems the library owner should do something to support golang 1.12? But in my case, all things works fine just a
So my question:
Should I worry about this, or this is just as expected?
main.go:
package main
import (
_ "github.com/zeromq/goczmq"
)
func main() {
}And more, I'm using golang 1.12 with gomod to manage my project.
See next, I use
go mod init xxx, and when build, it downloads goczmq automatically for me and add dependency to go.mod, but has incompatible in it. (But for other library I may get something like github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181)go.mod:
module pigeon
go 1.12
require (
github.com/zeromq/goczmq v4.1.0+incompatible
)From some discussion (for other library), e.g. this, it seems the library owner should do something to support golang 1.12? But in my case, all things works fine just a
incompatible there make me a little worried (I mean all seems ok now, but some day when I use an api which I never used before, there will be hidden bomb there...?)So my question:
Should I worry about this, or this is just as expected?
Solution
+incompatible means the dependency has a semver major version of 2 or higher and is not a Go module yet (it doesn't have go.mod in its source code).Context
Stack Overflow Q#57355929, score: 86
Revisions (0)
No revisions yet.