On 6/11/20 4:07 PM, Shengjing Zhu wrote:
On Thu, Jun 11, 2020 at 4:55 PM Arnaud Rebillout
<[email protected]> wrote:
More fun now: in the case of gotest.tools, this magic mechanism does not work, 
and the build fails with multiple lines such as:

     package gotest.tools: code in directory /tmp/gotestdir/src/gotest.tools expects 
import "gotest.tools/v3"

After much painful investigation, I found out that gotest.tools uses "import 
aliases" everywhere. That is, lines such as:

     package assert // import "gotest.tools/v3/assert"

The directive "// import ..." is an import alias, and that's what prevents Go 
from dealing with the import path successfully.

That feels awkward... Can we just add a patch to remove this alias?

Yep I'm doing exactly that at the moment, and discussing the issue with upstream [1]. It seems like these import aliases are not needed anyway.

[1]: https://github.com/gotestyourself/gotest.tools/issues/203


Reply via email to