-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: don't warn about "no non-test Go files" when building/installing wildcard #22409
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
Comments
^ this is the wrong path, did you mean
|
@davecheney yep… fixed |
Based on the above reply by the OP. I assume this can now be closed. |
can we reopen? |
Sure, I've just assumed based on your answer that it was fixed. Please close it yourself if it all works out. |
Duplicate of #8279 |
I think it's clear that |
Just to add my 2c, I've hit this exact issue just now. My use case is that I'm doing some code generation in a CI build step, and as a last sanity check I try to build a huge repository to make sure that all dependencies (for the generated code too) are correctly vendored in. The simplest way is to do I fully agree that a warning for this scenario is nice. But does it really make sense to fail the entire process for it? I'd expect |
Same here, also in CI for caching deps:
|
@powerman - You are directly trying to install the This issue is about trying to install/build a repo with a This can be solved with a simple workaround of adding any dummy file with a non In general, our approach towards warnings have been to avoid them in the first place by fixing them. And if it cannot be fixed, throw an error. So, I am not sure whether we should throw a warning. Even if the above workaround is not feasible in some cases, you can always do a |
No, I'm not. It's
Sure, but it's not my package - it just one of often used dependencies. |
Ah that's right. It is
Yep, I mentioned this above. In that case, you have to install the sub-packages separately. Maybe @ianlancetaylor has a better solution. |
More or less. It's a base image shared between several projects with different dependencies, so it include most common ones.
I do go get those. And everything is fine, so far.
Probably this issue happens because after I did go get I wanna rebuild all these packages plus stdlib once again, this time with Probably only way to avoid these issues is give up on using But all of this just means |
Why is it clear? If there's nothing to do then it should do nothing and exit 0. It's fine to print a warning but why should it exit non-zero? |
@clintmod I think it should fail because the command explicitly requests installing a specific package that can not be installed. I don't consider this a case where there is nothing to be done. I consider it a case where the user requested an action that is impossible. |
Change https://golang.org/cl/121196 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.1 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN="/Users/clint/code/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/clint/code/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9.1/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tr/j87dsghd3fsdh1m98b76fjrw0000gn/T/go-build293369783=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
cd $GOPATH
go get github.com/clintmod/goBuildBug
cd $GOPATH/src/github.com/clintmod/goBuildBug
go install ./...
What did you expect to see?
The build to succeed.
What did you see instead?
go build github.com/clintmod/goBuildBug/tests: no non-test Go files in github.com/clintmod/goBuildBug/tests
The text was updated successfully, but these errors were encountered: