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
I have a project with a vendor folder that was converted from the dep tool. Now I use go mod tidy/vendor. As of 1.13, if I use the go build|test calls, the vendor folder is ignored and modules is being used.
I can't remove the go.mod/sum files because I need them to support future go mod tidy/vendor calls.
What did you expect to see?
I expected backwards compatibility with the vendor folder and it to be respected. It is irrelvant how that folder is being maintained. Since I used Go's support to maintain it, Go should still respect it as a first priority. Vendoring has been around long before modules.
What did you see instead?
This is causing me all sorts of workflow problems. I now have to use -mod=vendor for the vendor folder to be respected. I have to set this as a default in my editor for calling all the Go tooling commands.
If I decide to move to the terminal and manually run go build|test I need to remember to use that flag. If I use the flag on a project not using modules, I get compiler messages about the project not using modules. So now I have to reverse the setting, which I can't in an editor. Working with different projects using different schemes for dependencies is now very difficult.
Simple solution
If the Go tool respected the vendor folder as a first priority, maintaining years of backwards compatibility, all these issues go away. Any project using vendoring doesn't feel the effect of this new module system.
The text was updated successfully, but these errors were encountered:
Note that in the meantime, you can use the vendor directory automatically by setting GOFLAGS=-mod=vendor in your environment (or using go env -w GOFLAGS=-mod=vendor), or disable module mode (and drop back to the GOPATH-mode vendoring behavior) by setting GO111MODULE=off explicitly.
Sorry for the duplicate issue. If the tooling didn't error when the -mod=vendor flag existed without a vendor folder, I would have been ok. Setting GOFLAGS doesn't work because of the compiler errors. Projects also start out without dep management, then it is added in, then vendoring may be the option. Again, setting these global settings don't work.
I just think if a vendor folder is respected, all of these workflow issues go away. The default behavior works. Projects don't need the extra flags.
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
)?go env
OutputWhat did you do?
I have a project with a vendor folder that was converted from the
dep
tool. Now I usego mod tidy/vendor
. As of 1.13, if I use thego build|test
calls, the vendor folder is ignored and modules is being used.I can't remove the
go.mod/sum
files because I need them to support futurego mod tidy/vendor
calls.What did you expect to see?
I expected backwards compatibility with the vendor folder and it to be respected. It is irrelvant how that folder is being maintained. Since I used Go's support to maintain it, Go should still respect it as a first priority. Vendoring has been around long before modules.
What did you see instead?
This is causing me all sorts of workflow problems. I now have to use
-mod=vendor
for the vendor folder to be respected. I have to set this as a default in my editor for calling all the Go tooling commands.If I decide to move to the terminal and manually run
go build|test
I need to remember to use that flag. If I use the flag on a project not using modules, I get compiler messages about the project not using modules. So now I have to reverse the setting, which I can't in an editor. Working with different projects using different schemes for dependencies is now very difficult.Simple solution
If the Go tool respected the vendor folder as a first priority, maintaining years of backwards compatibility, all these issues go away. Any project using vendoring doesn't feel the effect of this new module system.
The text was updated successfully, but these errors were encountered: