coreos / coreos/go-systemd

Troubles with Go modules and version mismatches

Open
#321 15 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/gomod-fallout
Dominant language
Go
Stars
2.7k
Forks
338
PR merge metrics
No merged PRs in 30d

Description

I was just converting a project to a Go module, and was pleased to see #307 merged and v22.0.0 tagged. So I was trying to rely on the go-systemd module, but ran into an error:

github.com/coreos/go-systemd/journal: no matching versions for query "latest"

I can trigger this error with this simple program:

package main
import _ "github.com/coreos/go-systemd/journal"
func main() {}

I can fix it by changing the import to github.com/coreos/go-systemd/v22/journal; however, that doesn't help when I try to import, say, etcd, which gives me this error:

$  go mod tidy
go: finding golang.org/x/net latest
go: finding github.com/coreos/pkg latest
go: finding github.com/tmc/grpc-websocket-proxy latest
go: finding golang.org/x/time latest
go: finding github.com/xiang90/probing latest
go: finding github.com/golang/groupcache latest
go: finding github.com/coreos/go-systemd/journal latest
go: finding github.com/coreos/go-systemd latest
example.com/try imports
	go.etcd.io/etcd/embed imports
	github.com/coreos/pkg/capnslog imports
	github.com/coreos/go-systemd/journal: no matching versions for query "latest"

I guess this can be fixed by capnslog adding v22 to its import, but I don't think that package has been modularized, yet. Is there some other way I can get go mod and friends to find v22 as the latest?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal Go program and run go mod tidy using the imports shown, then inspect the module versioning for github.com/coreos/go-systemd and the capnslog dependency mentioned in the error. Determine whether the reported imports can resolve the v22 module; done means the reproduction no longer reports a missing latest version and the dependent etcd case is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.