cosmos72 / gomacro

Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined: pkgpath

chbk opened this issue · comments

commented

When running go install with this as a dependency, the following error appears:

# github.com/cosmos72/gomacro/base/genimport
../../../../pkg/mod/github.com/cosmos72/gomacro@v0.0.0-20220530072503-c719ab5c40fc/base/genimport/importer_load.go:88:28: cannot use pkgpaths (type []PackagePath) as type []string in argument to runGoGetIfNeeded
../../../../pkg/mod/github.com/cosmos72/gomacro@v0.0.0-20220530072503-c719ab5c40fc/base/genimport/importer_load_go1_15.go:26:46: undefined: pkgpath

go version go1.13.8 linux/amd64

Hi @chbk,
Go 1.13.8 is quite old - nearly the oldest version still supported by gomacro, at least in theory.
Maybe I forgot some bits for such old version, I'll check.

should be fixed in commit 3d21d22 - can you check?

commented

Seems to work fine with go 1.13.8:

go get github.com/cosmos72/gomacro@3d21d22d88e2c87d99a2cc36b40fe1526b2d9f3f
go: finding github.com/cosmos72/gomacro 3d21d22d88e2c87d99a2cc36b40fe1526b2d9f3f
go: downloading github.com/cosmos72/gomacro v0.0.0-20221014153037-3d21d22d88e2
go: extracting github.com/cosmos72/gomacro v0.0.0-20221014153037-3d21d22d88e2
go: downloading github.com/peterh/liner v1.2.2
go: downloading golang.org/x/tools v0.1.11
go: downloading github.com/mattn/go-runewidth v0.0.13
go: extracting github.com/peterh/liner v1.2.2
go: extracting github.com/mattn/go-runewidth v0.0.13
go: downloading golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1
go: downloading github.com/rivo/uniseg v0.2.0
go: extracting github.com/rivo/uniseg v0.2.0
go: extracting golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1
go: extracting golang.org/x/tools v0.1.11
go: downloading golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
go: extracting golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
go: finding github.com/mattn/go-runewidth v0.0.13
go: finding github.com/rivo/uniseg v0.2.0
go: finding github.com/peterh/liner v1.2.2
go: finding golang.org/x/tools v0.1.11
go: finding golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1
go: finding golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4

Also ran another successful test with manually updated go.mod file, then running go install. Thanks for the quick fix.