When trying today to use /cmd/entviz for the first time, I ran into the following error:
$ entviz ./ent/schema
2022/06/11 16:01:21 internal error: package "context" without types was imported from "entgo.io/ent"
Digging further, it appears that this is an issue caused by an outdated version of golang.org/x/tools which lacks support for go1.18. This dependency is present in entgo.io/ent versions < v0.10.0, but later versions upgrade this dependency and fix the issue. (See discussion here: https://github.com/ent/ent/issues/2155).
Running the following two commands in a local clone of this repository before re-installing the package fixed the issue.
go get entgo.io/ent@latest
go mod tidy
I'm not sure if upgrading ent has the potential to break backwards compatibility, but if not I can open a PR to merge these changes.
When trying today to use
/cmd/entviz
for the first time, I ran into the following error:Digging further, it appears that this is an issue caused by an outdated version of
golang.org/x/tools
which lacks support for go1.18. This dependency is present inentgo.io/ent
versions < v0.10.0, but later versions upgrade this dependency and fix the issue. (See discussion here: https://github.com/ent/ent/issues/2155).Running the following two commands in a local clone of this repository before re-installing the package fixed the issue.
I'm not sure if upgrading
ent
has the potential to break backwards compatibility, but if not I can open a PR to merge these changes.