antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
17.03k stars 3.27k forks source link

[Doc] Go instructions incomplete. #4304

Open kaby76 opened 1 year ago

kaby76 commented 1 year ago
jimidle commented 1 year ago

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/v4@4.13.0 #To this exact version go get -u github.com/antlr4-go/antlr/v4@4.13.1 #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