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: mod vendor command skip failed dependencies #28447

Closed
chapsuk opened this issue Oct 28, 2018 · 2 comments
Closed

cmd/go: mod vendor command skip failed dependencies #28447

chapsuk opened this issue Oct 28, 2018 · 2 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@chapsuk
Copy link

chapsuk commented Oct 28, 2018

≻ go version
go version go1.11.1 darwin/amd64
≻ go env
GOARCH="amd64"
GOBIN="/Users/chapsuk/go/bin"
GOCACHE="/Users/chapsuk/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/chapsuk/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.1/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/1n/44fppc_x3bg_pbk4cl4gc4wc0000gn/T/go-build389417477=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Let's imitate connection problems, in real world package source can be unreachable:
echo "127.0.0.1 	mellium.im" >> /etc/hosts
  1. Use sample
package main

import (
	"fmt"
	"mellium.im/sasl"
)

func main() {
	fmt.Printf("%v", sasl.ErrAuthn)
}
  1. Try vendor it
$ env GO111MODULE=on go mod vendor -v
Fetching https://mellium.im/sasl?go-get=1
https fetch failed: Get https://mellium.im/sasl?go-get=1: dial tcp 127.0.0.1:443: connect: connection refused
Fetching https://mellium.im?go-get=1
https fetch failed: Get https://mellium.im?go-get=1: dial tcp 127.0.0.1:443: connect: connection refused
go: no dependencies to vendor

What did you expect to see?

Error result code:

$ echo $?
1

What did you see instead?

Success result code:

$ echo $?
0
@chapsuk chapsuk changed the title Go mod vendor skip failed dependendcies cmd/go: mod vendor command skip failed dependencies Oct 28, 2018
@katiehockman katiehockman added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 29, 2018
@katiehockman
Copy link
Contributor

/cc @bcmills @rsc @ianlancetaylor

@bcmills bcmills added this to the Go1.12 milestone Oct 29, 2018
@bcmills
Copy link
Contributor

bcmills commented Nov 16, 2018

Duplicate of #27063.

@bcmills bcmills closed this as completed Nov 16, 2018
@golang golang locked and limited conversation to collaborators Nov 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants