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: does not verify existence of replace directory #28032
Comments
very odd; if I however have the following;
and package main
import (
"fmt"
"github.com/pkg/errors"
)
func main() {
fmt.Println(errors.New("Hey ya"))
} I get a nice error message; go mod tidy && \
go mod verify && \
go run main.go go: parsing ../nonexistentDirectory/AntherDirectoryThatDoesNotExist/go.mod: open /home/myname/Downloads/nonexistentDirectory/AntherDirectoryThatDoesNotExist/go.mod: no such file or directory
go: error loading module requirements |
@gopherbot please add modules |
|
I'm not sure that |
There are three possible directions we could go here:
I'm not sure which of those makes the most sense. I'll discuss with @rsc. |
This is what I would have expected a command called from
|
I'm leaning toward option (2): if a |
on second thought, I agree with you.
On Thu, 17 Jan 2019 at 21:29, Bryan C. Mills ***@***.***> wrote:
I'm leaning toward option (2): if a replace directive has no effect in
the main module, it has no effect anywhere, and go mod tidy should remove
it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28032 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE7LUWAtgYdJDw_5vWkv8w03f5idG80Jks5vEMEDgaJpZM4XJ9hL>
.
--
Thanks,
KomuW.
https://www.komu.engineer/about
|
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
create this
go.mod
file;module aha require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7 // indirect github.com/gin-gonic/gin v1.3.0 // indirect github.com/golang/protobuf v1.2.0 // indirect github.com/json-iterator/go v1.1.5 // indirect github.com/mattn/go-isatty v0.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.5.0 github.com/stretchr/testify v1.2.2 // indirect github.com/ugorji/go/codec v0.0.0-20180927125128-99ea80c8b19a // indirect golang.org/x/net v0.0.0-20181005035420-146acd28ed58 // indirect golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect golang.org/x/sys v0.0.0-20181004145325-8469e314837c // indirect gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/go-playground/validator.v8 v8.18.2 // indirect gopkg.in/yaml.v2 v2.2.1 // indirect ) replace github.com/rs/cors/wrapper/gin => ../nonexistentDirectory/AntherDirectoryThatDoesNotExist
and this
main.go
file;then run;
What did you expect to see?
a failure with a nice error message pointing out that the path
../nonexistentDirectory/AntherDirectoryThatDoesNotExist
does not exist.What did you see instead?
The text was updated successfully, but these errors were encountered: