-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
could not import machine (no package for import machine)compiler #43079
Comments
The error message here is correct: From what I understand, the (CC @aykevl) |
@bcmills thanks for CCing me! Yes, this definitely is a TinyGo issue which doesn't belong in the Go project itself.
It seemed like a good idea at the time but now not so much. However, changing the import path is going to be difficult so it has to be done only when the benefits are significant. That said, for TinyGo the Yesterday I looked into using I know this is somewhat off topic for this issue but any ideas here would be appreciated. |
@aykevl, the Go standard library currently vendors in a few external libraries (such as (Unfortunately, at the moment the Go vendoring approach does not allow user code to import the same vendored packages, so today that approach would result in some code duplication that might be too costly in an embedded context; see #30241 for more detail and some alternatives under consideration.) |
@bcmills technically yes but I would really like to keep all the code in a single repository. Otherwise adding support for a new chip (which happens much more often than adding a new architecture) would require changing multiple repositories. Therefore I'm hoping #34055 will get accepted which would provide a way to transition away from these paths. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
➜ ~ git:(master) ✗ tinygo version
tinygo version 0.16.0 darwin/amd64 (using go version go1.15.6 and LLVM version 10.0.1)
What operating system and processor architecture are you using (
go env
)?GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/alperen/Library/Caches/go-build" GOENV="/Users/alperen/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/alperen/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/alperen/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_r/kff8ys5x4y7ct7djw7tblv4h0000gn/T/go-build298683877=/tmp/go-build -gno-record-gcc-switches -fno-common"
OutputWhat did you do?
gorobot.go:4:2: cannot find package "machine" in any of:
https://play.golang.org/p/-yEb1jgtiwN/usr/local/go/src/machine (from $GOROOT)
/Users/alperen/go/src/machine (from $GOPATH)
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: