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
The custom import path checking proposal[1] says, "The go command will
refuse to install a package with an import comment under any import path
except the one named in the comment." However, the current behaviour is
to refuse whenever there is a mismatch between the import path and the
repo does not match the root, irrespective of whether a custom import
was defined. To my reading the current behaviour is not what was
specified in the proposal.
This gets a number of user/developers who expect to be able to update
their package originally checked out with git: by using go get. An an
example is here[2].
There are two possible approaches to fixing this - both trivial,
depending on checking that p.ImportComment != "" in
cmd/go/downloadPackage[3] and either issuing a non-misleading error
(don't mention custom import paths since there was none) or just allow
the completion of the request.
I think we should probably relax things so that github.com/xxx/yyy does not get a custom import path check unless it has an import comment.
---------- Forwarded message ----------
From: Dan Kortschak dan.kortschak@adelaide.edu.au
Date: Thu, May 21, 2015 at 8:10 PM
Subject: proposal to make import path checking only error when custom import is defined
To: golang-dev@googlegroups.com, Russ Cox rsc@golang.org
The custom import path checking proposal[1] says, "The go command will
refuse to install a package with an import comment under any import path
except the one named in the comment." However, the current behaviour is
to refuse whenever there is a mismatch between the import path and the
repo does not match the root, irrespective of whether a custom import
was defined. To my reading the current behaviour is not what was
specified in the proposal.
This gets a number of user/developers who expect to be able to update
their package originally checked out with git: by using go get. An an
example is here[2].
There are two possible approaches to fixing this - both trivial,
depending on checking that p.ImportComment != "" in
cmd/go/downloadPackage[3] and either issuing a non-misleading error
(don't mention custom import paths since there was none) or just allow
the completion of the request.
Are either of these acceptable?
[1]https://golang.org/s/go14customimport
[2]https://groups.google.com/d/topic/golang-nuts/Zi-Kw2tbif8/discussion
[3]
go/src/cmd/go/get.go
Line 302 in db454af
The text was updated successfully, but these errors were encountered: