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

Fix #3967 Merge of Prediction Context arrays was broken #4180

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

jimidle
Copy link
Collaborator

@jimidle jimidle commented Mar 15, 2023

fix: Fixes merge arrays to perform an actual comparison rather than comparing two pointers!
Fixes: #3967
Closes #3967

  • A small error was made whereby the comparison with a newly created merge M of two prediction contexts
    a and b, was comparing the pointers of a and M and not using the internal Equals() method.
    The ATN output trace is now equal.

  • Also adds a new testrig internal project (so it won't be used by go get) that allows quick setup
    and testing of ATN tracing for a test grammar and test input.

  • Excludes go performance profiles from git

  • Corrects a small error in one of the ATN tracing scripts.

…omparing two pointers!

Fixes: antlr#3967
Closes antlr#3967

 - A small error was made whereby the comparison with a newly created merge `M` of two prediction contexts
  `a` and `b`, was comparing the pointers of `a` and `M` and not using the internal Equals() method.
  The ATN output trace is now equal.

 - Also adds a new testrig internal project (so it won't be used by `go get`) that allows quick setup
   and testing of ATN tracing for a test grammar and test input.

 - Excludes go performance profiles from git

 - Corrects a small error in one of the ATN tracing scripts.

Signed-off-by: Jim.Idle <jimi@idle.ws>
… fixed

Signed-off-by: Jim.Idle <jimi@idle.ws>
@jimidle
Copy link
Collaborator Author

jimidle commented Mar 15, 2023

@parrt Usual CPP tests failing - who can we get to fix this?

@jimidle
Copy link
Collaborator Author

jimidle commented Mar 16, 2023

@parrt I am backed up on this PR, if you have a chance to merge it? Cheers

@parrt parrt added this to the 4.12.1 milestone Mar 16, 2023
@parrt parrt merged commit 2bd5d13 into antlr:dev Mar 16, 2023
@jimidle jimidle deleted the feature/3967 branch March 17, 2023 07:36
@parrt
Copy link
Member

parrt commented Mar 18, 2023

No idea how to fix those C++ build errors. some github actions crap. :( @ericvergnaud have any ideas?

@ericvergnaud
Copy link
Contributor

@hs-apotell is looking into it

@jimidle
Copy link
Collaborator Author

jimidle commented Mar 19, 2023 via email

@hs-apotell
Copy link
Collaborator

Not all users have the development environment setup to build and debug every platform that antlr supports. The artifacts are uploaded to ease that pain.

@jimidle
Copy link
Collaborator Author

jimidle commented Mar 19, 2023 via email

@hs-apotell
Copy link
Collaborator

The issue is not restricted to C++ specific CI jobs. They are, however, prone to this error more than others. Don't ask why because I don't have a convincing answer for that. But going thru' the past history of builds on CI, you can notice the error across all different flavors. Size of the upload may be a criteria. But again, that hasn't really changed much and yet the issue started happening a lot more often only recently.

Anyone using the build - yes, I do occasionally but not the cpp ones but other including csharp, dart, go and other mac specific targets. They have been useful in resolving issues that I can't reproduce locally or I don't have an environment to test for (like mac).

Regardless, the change I introduced here in this PR #4186 is a compromise solution. An attempt is made to upload the artifacts but a failure wouldn't make the entire build fail. If need be, the user can trigger a rebuild of specific target to get the artifact if the previous attempt failed.

@jimidle
Copy link
Collaborator Author

jimidle commented Mar 19, 2023 via email

@hs-apotell
Copy link
Collaborator

The reason the build outputs/artifacts are useful is because the logs from the builds aren't readily available for diagnosis from the CI window. Either someone can spend the time to cherry-pick the logs for each configuration/platform/target and upload them as artifact or bundle up the whole thing and throw it up there. I chose the latter solution to cover the ground for all platforms and targets (and partially because I don't develop for all the supported platforms/targets). Can the artifact size be optimized? Yes, of course. But they aren't large enough to be a problem. Other projects I work on each artifact is over 1GB and each build can generate anywhere from 2 to 8 such artifacts. So, compared to those artifacts, antlr generated artifacts are minuscule in size.

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

Successfully merging this pull request may close these issues.

4 participants