You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
What did you do?
I ran the go mod vendor command and then edited a file within the vendor folder to troubleshoot a personal problem. However, when building, the compiler did not take into account the vendor folder with the file I modified.
Then I needed to build with the flag "go build -mod=vendor maing.go" and yes, it took into account the file I modified.
I looked in the Go doc (https://go.dev/ref/mod#build-commands) (By default, if the go version in go.mod is 1.14 or higher and a vendor directory is present, the go command acts as if -mod=vendor were used. Otherwise, the go command acts as if -mod=readonly were used.)
I then realized that it could be a possible bug because the vendor folder exists and therefore the compiler should take it into consideration without the need to explicitly pass the -mod=vendor flag.
What did you expect to see?
When modifying a file within the vendor folder I expected to know if a block of code was executed but it did not execute.
Example a simple log.Println("Ok Ok")
however it didn't happen.
What did you see instead?
That the compiler does not take into account the vendor folder
The text was updated successfully, but these errors were encountered: