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

[Doc] Go instructions incomplete. #4304

Open
kaby76 opened this issue Jun 6, 2023 · 1 comment
Open

[Doc] Go instructions incomplete. #4304

kaby76 opened this issue Jun 6, 2023 · 1 comment

Comments

@kaby76
Copy link
Contributor

kaby76 commented Jun 6, 2023

  • The Go instructions say If you have not yet run a go get, you can now run go mod tidy and update your. "your ......." what? It's an incomplete sentence and I'm not sure what it's trying to say.
  • Again, referring to the same sentence, why would anyone do a go mod tidy, when it says immediately before to do a go get -u github.com/antlr4-go/antlr. I don't do a "go mod tidy", and the builds work fine.
  • Question: Is it go get -u github.com/antlr4-go/antlr or is it go get -u github.com/antlr4-go/antlr/v4?? I use the latter, and that works for me. But, I don't understand if there is a difference between go get -u github.com/antlr4-go/antlr and go get -u github.com/antlr4-go/antlr/v4.
  • The instructions don't make it clear how to use a specific version of Antlr. I found out that go get -u github.com/antlr4-go/antlr/[email protected] works. Would have been nice if that was in the instructions.
  • I need to use Github Dependabot to update the Go target for Antlr4 when there's a new release made. I don't want to pick up the latest of Go and be subjected to changes that I haven't reviewed. Further, the "antlr4" Python tool isn't really robust when trying to figure out the latest version of the tool. antlr4 isn't robust with slow links. antlr4-tools#13. So, I would prefer not to do go get -u github.com/antlr4-go/antlr for every build via go build Test.go.
    • I don't know whether to check into version control the go.mod, the go.sum, or both.
    • I don't know how yet to set up the dependabot.yml file for Go. Anyone have experiences with this?
@jimidle
Copy link
Collaborator

jimidle commented Jun 7, 2023

I will take a look. Those docs were updated in a bit of a rush. However, I think that I may have already fixed the go get -u github.com/antlr4-go/antlr/v4 piece - it is definitely that - you need the /v4. I will fix if I have not already done it. I have some local changes that I have not had time to properly review before submitting the PR.

go mod tidy

...will look at the source and remove any unused references and add any that are missing. If you have not run a go get but just generated the code, then go mod tidy will do it all for you. This should be run anyway, but will sometimes not need to do anything.

The instructions do rely on you knowing the go tooling, so I don't explain how to use a specific version as this should be common knowledge for Go programmers - I can add it for free though ;). I know you are not really advertising yourself as a Go programmer.

For instance:

go get -u github.com/antlr4-go/antlr/v4
or
go get -u github.com/antlr4-go/antlr/v4@latest

Should update you to the latest tag.

go get -u github.com/antlr4-go/antlr/[email protected] #To this exact version
go get -u github.com/antlr4-go/antlr/[email protected] #To this exact version, etc

There is also:

go get -u github.com/antlr4-go/antlr/v4@devel
go get -u github.com/antlr4-go/antlr/v4@master
go get -u github.com/antlr4-go/antlr/v4@tag

You should check in go.mod and go.sum .

Most Go programmers will have read:

https://github.com/golang/go/wiki/Modules#releasing-modules-all-versions

Note that I say most

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