Skip to content
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

Gazelle cannot parse new go.mod directives #1825

Open
uhthomas opened this issue Jun 12, 2024 · 5 comments
Open

Gazelle cannot parse new go.mod directives #1825

uhthomas opened this issue Jun 12, 2024 · 5 comments

Comments

@uhthomas
Copy link
Contributor

What version of gazelle are you using?

v0.37.0

What version of rules_go are you using?

v0.48.0

What version of Bazel are you using?

6.5.0

Does this issue reproduce with the latest releases of all the above?

Yes.

What operating system and processor architecture are you using?

Linux x86

What did you do?

bazel run //:gazelle
go 1.22.2

toolchain go1.22.3

What did you expect to see?

What did you see instead?

gazelle: reading module paths from /home/thomas/code/github.com/uhthomas/automata/go.mod: /home/thomas/code/gith
ub.com/uhthomas/automata/go.mod:3: invalid go version '1.22.2': must match format 1.23
/home/thomas/code/github.com/uhthomas/automata/go.mod:5: unknown directive: toolchain
@fmeum
Copy link
Member

fmeum commented Jun 13, 2024

The go_deps extension with Bzlmod has support for this directive already. Is it possible for you to migrate? Happy to review a PR as well.

@uhthomas
Copy link
Contributor Author

The go_deps extension with Bzlmod has support for this directive already. Is it possible for you to migrate? Happy to review a PR as well.

I see - I'm still using rules_k8s and rules_docker. I guess I'd need to figure out how to replace them.

@fmeum
Copy link
Member

fmeum commented Jun 13, 2024

Do they straight up don't work with Bzlmod? You should generally be able to keep them in WORKSPACE or WORKSPACE.bzlmod and just migrate the rest.

@uhthomas
Copy link
Contributor Author

Do they straight up don't work with Bzlmod? You should generally be able to keep them in WORKSPACE or WORKSPACE.bzlmod and just migrate the rest.

I remember trying this on a different repository and it went horribly. Has the situation improved?

@fmeum
Copy link
Member

fmeum commented Jul 30, 2024

I unfortunately don't know, I don't use them myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants