Skip to content

Fix Go test suite #3175

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

Closed
parrt opened this issue May 4, 2021 · 5 comments · Fixed by #3176 or #3185
Closed

Fix Go test suite #3175

parrt opened this issue May 4, 2021 · 5 comments · Fixed by #3176 or #3185

Comments

@parrt
Copy link
Member

parrt commented May 4, 2021

Currently the Go target has some problems that prevented from passing tests. @Joakker and @prnvbn have agreed to help with the Go target so let's see if we can fix that first and then come back to #2504

Here's a link to the failing appveyor for Go:

...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.antlr.v4.test.runtime.go.TestCompositeLexers
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.406 sec <<< FAILURE! - in org.antlr.v4.test.runtime.go.TestCompositeLexers
org.antlr.v4.test.runtime.go.TestCompositeLexers  Time elapsed: 0.406 sec  <<< ERROR!
java.lang.Exception: 
Non-zero exit while caching go runtime, output: go: go.mod file not found in current directory or any parent directory; see 'go help modules'
	at org.antlr.v4.test.runtime.go.TestCompositeLexers.groupSetUp(TestCompositeLexers.java:24)
...

Seems go.mod is missing whatever that is!

@Joakker
Copy link
Contributor

Joakker commented May 4, 2021

Ok, this one should be pretty easy to implement. go.mod is a signature file that describes the directory and all it's children as part of a module. Recent versions of the go tool have migrated to using only modules by default, so more than likely that's why it's complaining. I'll open a PR shortly with the file added

@prnvbn
Copy link

prnvbn commented May 4, 2021

Seems like running go mod init would be enough. Also @Joakker you might have to pull some weight before the 14th of May as I have University exams. After that, I will make up for it!

@Joakker
Copy link
Contributor

Joakker commented May 4, 2021

Is ok, no worries 😃

@mitar
Copy link
Contributor

mitar commented May 11, 2021

Awesome. I can update my PR (#3174) to get tests to pass there, too.

@parrt
Copy link
Member Author

parrt commented May 23, 2021

Comments from previous thread: #2504 (comment)

@parrt parrt added this to the 4.9.3 milestone Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants