Skip to content

Comments

Dependency update [lightstep-tracer-go/go-opencensus]#1029

Merged
peterbourgon merged 1 commit intomasterfrom
ChrisHines/issue1000
Nov 3, 2020
Merged

Dependency update [lightstep-tracer-go/go-opencensus]#1029
peterbourgon merged 1 commit intomasterfrom
ChrisHines/issue1000

Conversation

@ChrisHines
Copy link
Member

Fixes #1000

@ChrisHines
Copy link
Member Author

/CC @vrazdalovschi

@@ -1,11 +1,12 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you manually remove this (and other) lines from go.sum, or was it done automatically somehow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just go mod tidy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, go mod tidy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, I thought go.sum was append-only.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checksum database is append only, and go.sum used to be append only, but see golang/go#26381 for when the thought process changed and https://golang.org/ref/mod#go for where it is documented that go mod tidy removes unnecessary entries.

@ChrisHines
Copy link
Member Author

ChrisHines commented Nov 3, 2020 via email

@peterbourgon
Copy link
Member

Sure, although I want to observe that this won't actually fix the problem. Go modules' solving algorithm, MVS, can substitute a given dependency+version with any "compatible" version of that dependency, and "compatibility" under major version 0 is basically "any version".

$ tree
.
├── a
│   ├── a.go
│   ├── go.mod
│   └── go.sum
└── b
    ├── go.mod
    ├── go.sum
    └── main.go
$ cat a/go.mod a/a.go
module a

go 1.15

require (
        github.com/lightstep/lightstep-tracer-go v0.22.0
)

package a

import (
        "github.com/lightstep/lightstep-tracer-go"
)

func Version() string {
        return lightstep.TracerVersionValue
}
$ cat b/go.mod b/main.go
module b

go 1.15

require (
        a v0.0.1
)

replace (
        a => ../a
        github.com/lightstep/lightstep-tracer-go => github.com/lightstep/lightstep-tracer-go v0.18.1
)

package main

import (
        "a"
)

func main() {
        println(a.Version())
}
$ cd b ; and go build ; and ./b
0.18.1

@peterbourgon peterbourgon merged commit 2125fae into master Nov 3, 2020
@peterbourgon peterbourgon deleted the ChrisHines/issue1000 branch November 3, 2020 15:30
@ChrisHines
Copy link
Member Author

Sure, although I want to observe that this won't actually fix the problem. Go modules' solving algorithm, MVS, can substitute a given dependency+version with any "compatible" version of that dependency, and "compatibility" under major version 0 is basically "any version".

replace (
a => ../a
github.com/lightstep/lightstep-tracer-go => github.com/lightstep/lightstep-tracer-go v0.18.1
)

Of course the main module can override anything with a replace in its go.mod. That's what replace is for and outside the scope of anything that we should worry about in the Go kit go.mod file.

@sagikazarmark sagikazarmark added this to the v0.11.0 milestone Jun 19, 2021
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

Successfully merging this pull request may close these issues.

Dependency update [lightstep-tracer-go/go-opencensus]

4 participants