Closed coghost closed 3 years ago
It seems that import of third-party packages is broken in Go 1.16.x
Thanks for spotting this, I will work to fix it.
UPDATE: a partial fix is available in commit 60b0972adf4face6c2e72d96f426b57b7d83e11c it only works if the package being imported does not depend on other modules
I will continue working on a full bugfix.
As a temporary workaround, you can downgrade to Go 1.15.x and recompile gomacro.
UPDATE: an improved (and hopefully complete) fix is available in commit 0b986404ea464b36ce0ce7bba1a720af70f407fd
Working fine. Thanks!
Great Job, thanks, it works now!
❯ gomacro
// Welcome to gomacro. Type :help for help, :copy for copyright and license.
// This is free software with ABSOLUTELY NO WARRANTY.
gomacro> import (
. . . . "time"
. . . . "github.com/go-rod/rod"
. . . . "github.com/go-rod/rod/lib/input"
. . . . "github.com/go-rod/rod/lib/launcher"
. . . . )
// debug: running "go get github.com/go-rod/rod" ...
go get: added github.com/go-rod/rod v0.95.0
// debug: running "go mod tidy" ...
// debug: compiling "/Users/:)/go/src/gomacro.imports/github.com/go-rod/rod/rod.go" ...
// debug: running "go get github.com/go-rod/rod/lib/input" ...
go get: added github.com/go-rod/rod v0.95.0
// debug: running "go mod tidy" ...
// debug: compiling "/Users/:)/go/src/gomacro.imports/github.com/go-rod/rod/lib/input/input.go" ...
// debug: running "go get github.com/go-rod/rod/lib/launcher" ...
go get: added github.com/go-rod/rod v0.95.0
// debug: running "go mod tidy" ...
// debug: compiling "/Users/:)/go/src/gomacro.imports/github.com/go-rod/rod/lib/launcher/launcher.go" ...
gomacro>
❯ gomacro
// Welcome to gomacro. Type :help for help, :copy for copyright and license.
// This is free software with ABSOLUTELY NO WARRANTY.
gomacro> import (
. . . . "time"
. . . . "github.com/go-rod/rod"
. . . . "github.com/go-rod/rod/lib/input"
. . . . "github.com/go-rod/rod/lib/launcher"
. . . . )
// debug: running "go get github.com/go-rod/rod" ...
go get: added github.com/go-rod/rod v0.95.0
// debug: running "go mod tidy" ...
// debug: compiling "/Users/:)/go/src/gomacro.imports/github.com/go-rod/rod/rod.go" ...
// debug: running "go get github.com/go-rod/rod/lib/input" ...
go get: added github.com/go-rod/rod v0.95.0
// debug: running "go mod tidy" ...
// debug: compiling "/Users/:)/go/src/gomacro.imports/github.com/go-rod/rod/lib/input/input.go" ...
// debug: running "go get github.com/go-rod/rod/lib/launcher" ...
go get: added github.com/go-rod/rod v0.95.0
// debug: running "go mod tidy" ...
// debug: compiling "/Users/:)/go/src/gomacro.imports/github.com/go-rod/rod/lib/launcher/launcher.go" ...
gomacro>
gomacro>
Hi I check https://github.com/cosmos72/gomacro/issues/89 and https://github.com/cosmos72/gomacro/issues/58 but still cann't import 3rd party packages, I'm not familiar to golang, please help me to find out why, Thanks!