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

cmd/go: add release note for changes to go.mod automatic-update behavior in 1.18 #51242

Closed
h31 opened this issue Feb 17, 2022 · 3 comments
Closed
Labels
Documentation FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@h31
Copy link

h31 commented Feb 17, 2022

What version of Go are you using (go version)?

$ go version
go version go1.18rc1 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/artyom/Library/Caches/go-build"
GOENV="/Users/artyom/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/artyom/.asdf/installs/golang/1.18rc1/packages/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/artyom/.asdf/installs/golang/1.18rc1/packages"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/artyom/.asdf/installs/golang/1.18rc1/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/artyom/.asdf/installs/golang/1.18rc1/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18rc1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pr/5k6c2yx97cjb9t5fh0httxv80000gn/T/go-build2521786815=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Create go.mod with the following content:
module DepSync

go 1.17
  1. Create main.go with the following content:
package main

import (
	"github.com/davecgh/go-spew/spew"
)

func main() {
	spew.Println()
}
  1. Run go mod vendor

What did you expect to see?

$ go version
go version go1.17.7 darwin/amd64
$ go mod vendor
go: finding module for package github.com/davecgh/go-spew/spew
go: found github.com/davecgh/go-spew/spew in github.com/davecgh/go-spew v1.1.1
$ cat go.mod
module DepSync

go 1.17

require github.com/davecgh/go-spew v1.1.1
$ ls vendor/
github.com  modules.txt

What did you see instead?

$ go mod vendor
DepSync imports
	github.com/davecgh/go-spew/spew: no required module provides package github.com/davecgh/go-spew/spew; to add it:
	go get github.com/davecgh/go-spew/spew
@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Feb 17, 2022
@dmitshur dmitshur added this to the Go1.18 milestone Feb 17, 2022
@dmitshur
Copy link
Contributor

dmitshur commented Feb 17, 2022

Thank you for testing out the RC and making this report. When you say "stopped updating", do you mean this used to work with Go 1.17.7 and older?

CC @bcmills, @matloob.

@bcmills
Copy link
Contributor

bcmills commented Feb 17, 2022

The change in go mod vendor was intentional (CL 336151, for #45551), but it appears that we are missing a release note for it.

@bcmills bcmills changed the title cmd/go: go mod vendor stopped updating go.mod in 1.18 cmd/go: add release note for changes to go.mod automatic-update behavior in 1.18 Feb 17, 2022
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 17, 2022
@bcmills bcmills self-assigned this Feb 17, 2022
@gopherbot
Copy link

Change https://go.dev/cl/387920 mentions this issue: doc/go1.18: add release note for changes to automatic go.mod and go.sum updates

@rsc rsc unassigned bcmills Jun 22, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants