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

Head towards 4.11 release #3840

Closed
8 of 10 tasks
parrt opened this issue Aug 27, 2022 · 20 comments
Closed
8 of 10 tasks

Head towards 4.11 release #3840

parrt opened this issue Aug 27, 2022 · 20 comments
Milestone

Comments

@parrt
Copy link
Member

parrt commented Aug 27, 2022

Heh, we have to get 4.11 out so that people can use the amazing Go target what day is done by @jimidle.

Stuff to do:

What else needs to go in 4.11?

@jimidle @ericvergnaud @mike-lischke @marcospassos @pboyer, @janyou, @ewanmellor, @lingyv-li have comments?

@parrt parrt added this to the 4.11 milestone Aug 27, 2022
@KvanTTT
Copy link
Member

KvanTTT commented Aug 27, 2022

I wish the following issues were resolved:

@parrt
Copy link
Member Author

parrt commented Aug 27, 2022

Hmm..not sure I have the time to go through those for now. It will require a massive effort to remember all of the ATN stuff before I can evaluate those. The last one is something I probably won't accept because it's just refactoring and incurs a risk.

@lingyv-li
Copy link
Member

🙌 Nothing to add for Dart.

@mike-lischke
Copy link
Member

The EOF macro problem is tricky to solve. Either you annoy users who use C libs with ANTLR4 or you annoy existing project owners if you rename that symbol. Given that there are only very few complains I tend to keep the current solution. For the threads patch @jcking can probably help.

@parrt
Copy link
Member Author

parrt commented Aug 28, 2022

Yeah, breaking all existing users' code that ref EOF is problematic; i.e., we shouldn't rename. The undef trick @jcking suggested might not even be enough since someone can stick an include of C stdio.h after every include file. Wouldn't it be reasonable to ask the few users that need C libs to add #undef EOF right after ever #include that pulls in a EOF macro? Let me see if I can do a test.

@parrt parrt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2022
@parrt parrt removed this from the 4.11 milestone Aug 28, 2022
@parrt parrt added this to the 4.11 milestone Aug 28, 2022
@parrt parrt reopened this Aug 28, 2022
@marcospassos
Copy link
Contributor

marcospassos commented Aug 29, 2022

I don't think those issues impact the PHP target 🚀

@jimidle
Copy link
Collaborator

jimidle commented Aug 30, 2022

I will try to get in the remaining fixes (such as test failures) in the next two days, then I think the go runtime is good for 4.11 and I can move to more performance analysis

@parrt
Copy link
Member Author

parrt commented Aug 30, 2022

Awesome. Long weekend coming up and I hope to release the software over the weekend!

@jimidle
Copy link
Collaborator

jimidle commented Aug 31, 2022

@parrt Some prep and a little faffing about is needed to release the go runtime at 4.11.0:

The current v4.x.x tags do not work because only tags at v0.x.x and v1.x.x are picked up from a repo when the go.mod does not include a vn tag for the module. So currently, while we have a go.mod file, the go mod xxxx commands do not see any valid tags, so they are just syncing to last hash (HEAD) of the master branch.

So we need to:

  • Push a new tag v1.4.10 to point at the same hash as the 4.10.1 tag - this means that existing users who do not move to the v4 module are covered as they will stay on what we know as the 4.10.1 release even if they do a go get -u - in other words, backwards compatibility.
  • Delete the existing v4.x.x tags as when we move to a v4 module, those tags will be confusing (and will not work), as they won't include the change to the v4 module
  • We need to do this now so that pkg.go.dev has enough time to rebuild docs for the old release. Maybe I have permissions to do that as a member. If not then I will have to ask you of course.

That will get the current source into shape for go modules and as soon as the new tag is there, existing go modules will work properly instead of by accident. Note that pure GOPATH mode will not be supported anymore when we release. Go modules were introduced in go 1.11 and were default from go 1.13 - this should not be an issue for anyone as we have already been shipping a go.mod file, but it only partially works. This fixes it all.

Then, I will create a PR to move the module to v4:

  • The suffix v4 is used in the module name so that the import becomes github.com/antlr/antlr4/runtime/Go/antlr/v4 - this is SOP for Go when a module changes from a 1.x.x release.
  • Upgrading users will need to change their import modules
  • I will need to change any internal references to the module to also use /v4 in the module reference - this includes the codegen template and the test generator - all trivial stuff and the test setup will simplify a little as a result, which will speed go tests up a little, by avoiding some fork/exec stuff.

Then when you merge into master from dev, we need only do what you did before, which is create a tag v4.11.0 pointing to the same hash as the tag 4.11.0 (or 4.11 if you do it that way, but I think semver wants the minor even if it is 0). After that point, the tags will all work correctly in go modules.

You can see that the current tags are being ignored by go mod xxxx in two ways:

  1. When go mod tidy or go get are issued on a project using ANTLR, you will see that the version in your project's go.mod is require github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220826213629-cd8f367ca010. In other words, it does not use the tags and the project uses the HEAD of master, which is not what we want.
  2. The pkg.go.dev system is also unable to see the v4.x.x tags and lists the version the same way go.mod does: ANTLR docs so it also lists the module as version v0.0.0.xxxxxx

I have detailed the requirements above here extensively, but you can see that this is relatively trivial:

  1. Fix existing tags
  2. Accept PR to move module to /v4
  3. Release as normal, including create a v4.11.0 tag

We should document how to move to the v4 module in the release notes. I will also document this in the published runtime docs for the new module, which will list as v4.11.0, which keeps everything in sync from here on in.

NB: Changing to the v4 module normally implies breaking the public API, but in this case, that will not happen - nobody will need to change their existing code, other than to properly specify the module number.

BTW - if you migrate to use git flow (AVH version is best), you will be able to do emergency fixes in master and automatically keep dev up to date. It is simpler than standard git commands. There is a Maven plugin that takes care of this and a git plugin for standard command lines. It does not affect github PRs etc.

@jimidle
Copy link
Collaborator

jimidle commented Aug 31, 2022

As I thought, I do not have permissions to mess with the tags. So:

image

From these, delete the two v4.x.x tags and add a new v1.4.10 tag that points to the same hash as tag 4.10.1 (which is of course the same hash as v4.10.1)

@jimidle
Copy link
Collaborator

jimidle commented Aug 31, 2022

With PR #3852, the Go runtime is now ready for release. But please see above about the existing tags and new tag on the Master branch. We need to take care of those tags, before merging this PR from dev->master

Also, when you pull in my PRs, if you would please tag the hash with v4.11.0-beta or something similar, I can test that the v4 path for the runtime is hunky dory.

@parrt
Copy link
Member Author

parrt commented Aug 31, 2022

Hmm... Not sure I want to delete all of my tags. I will have to read your comment in detail but people of been telling me it works with v4.10.1 etc... OH! I get it now. Just the v versions not the 4.10.1 stuff. The v1.4.10 looks kind of weird. Are those only going in dev not master? I would hate to have a tag in master that said 1.4.10.

I wonder if we can simply get away with removing v4.10.0 instead of adding the weird v1.4.10? i.e., let's make a clean break? Most people are just pulling from master and their code will still just work, right? Nah, I'll follow your lead and add v1.4.10 for backward compatibility.

@parrt
Copy link
Member Author

parrt commented Aug 31, 2022

From these, delete the two v4.x.x tags and add a new v1.4.10 tag that points to the same hash as tag 4.10.1 (which is of course the same hash as v4.10.1)

Done! Killed v... and added v1.4.10 at 4.10.1

I resolved the conflicting GoRunner file and will merge after tests!

Ok, merged! Thanks a million! I think we're cleaned up on Go now.

@parrt
Copy link
Member Author

parrt commented Aug 31, 2022

Also, when you pull in my PRs, if you would please tag the hash with v4.11.0-beta or something similar, I can test that the v4 path for the runtime is hunky dory.

Added v4.11.0-go-beta for ya!

@jimidle
Copy link
Collaborator

jimidle commented Sep 1, 2022

OK - so to sort out the tags for go modules - sorry about the messing around, it is tricky:

  • We can put the old ones back exactly as they were, as some people seem to have used them, not realizing that they were meant for go - so be it
  • Delete the current v1.4.10 tag
  • Delete the v4.11.0-beta tag

Now we need to tag the go runtime slightly differently so that go modules embedded in the mono-repo will work and we can restore the old v4 tags as they were.

In the fully synced dev branch at the root of the repo (please note the exact paths in the commands below - they are very sensitive):

~/antlr/antlr4 (dev ✔) ᐅ git tag -a runtime/Go/antlr/v4/v4.11.0-go-beta -m "Go runtime module only" 
~/antlr/antlr4 (dev ✔) ᐅ git push origin runtime/Go/antlr/v4/v4.11.0-go-beta 

This allows go to realize that that tag is for the v4 module path

Now, in the master branch (before we pull inthe latest dev):

~/antlr/antlr4 (master ✔) ᐅ git tag -a runtime/Go/antlr/v1.4.10 -m "Go runtime module only" 
~/antlr/antlr4 (master ✔) ᐅ git push origin runtime/Go/antlr/v1.4.10 

When the release is made, then in the master branch:

~/antlr/antlr4 (master ✔) ᐅ git tag -a runtime/Go/antlr/v4/v4.11.0 -m "Go runtime module only" 
~/antlr/antlr4 (master ✔) ᐅ git push origin runtime/Go/antlr/v4/v4.11.0

This should then give us:

  • A beta tag from the dev branch, which I can test.
  • A release tag that works with go modules, which I can immediately verify
  • Existing projects that do not use modules or think that they are should work as they do now (but, if they use no modules at all, then they will autoupgrade to 4.11.0 without knowing - this seems a reasonable compromise as they will soon know

Now, a question is that we could also add a tag to the release so that if a project does not switch to the v4 module path, then a go get -u will tell them that they are now on 4.11. This seems like it might be better to do this for this release because I can add a deprecated tag to the existing go.mod telling them to switch to the v4 path and pointing at the docs.

I think we should do that, which means after you make the release in to master, as well as the v4 tag, add this tag:

~/antlr/antlr4 (master ✔) ᐅ git tag -a runtime/Go/antlr/v1.4.11 -m "Go runtime module only" 
~/antlr/antlr4 (master ✔) ᐅ git push origin runtime/Go/antlr/v1.4.11 

I think that then everyone will be happy and we do not need to change the tags in the master branch. Because we tag the submodules, the go mod will now happily ignore the previous v4.x.x tags.

Phew! That took some working out.

@jimidle
Copy link
Collaborator

jimidle commented Sep 2, 2022

@parrt Please let me know when you have fixed up the tags, I will verify that they work before you make the release.

@parrt
Copy link
Member Author

parrt commented Sep 2, 2022

@jimidle done:

  • We can put the old ones back exactly as they were, as some people seem to have used them, not realizing that they were meant for go - so be it
  • Delete the current v1.4.10 tag
  • Delete the v4.11.0-beta tag

will do the other bits next

@KvanTTT
Copy link
Member

KvanTTT commented Sep 2, 2022

I also suggest completing clearing up of C# runtime: #3861 Opened ANTLR4 C# runtime project looks like colorful Christmas tree in Rider. That's why I would like to fix most part of warnings.

@parrt
Copy link
Member Author

parrt commented Sep 2, 2022

Ok, @jimidle you should have your v4.11.0-go-beta (dev) and v1.4.10 (master) tags and I updated the release docs to indicate more details on v tags. Can you verify I did the tags on the right branch?

@parrt
Copy link
Member Author

parrt commented Sep 4, 2022

Ok, looks like i've checked off all the items for release. Gotta check antlr4-tools but I'll start heading towards release.

ericvergnaud pushed a commit to ericvergnaud/antlr4 that referenced this issue Sep 9, 2022
Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
ericvergnaud pushed a commit to ericvergnaud/antlr4 that referenced this issue Sep 9, 2022
Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
@parrt parrt closed this as completed Nov 4, 2022
parrt added a commit that referenced this issue Dec 21, 2022
* Fix CMake syntax for variable expansion

When using variables to compare (like in if clause) the variable
shouldn't be quoted. More details can be found at the link below:

https://cmake.org/cmake/help/latest/command/if.html#variable-expansion

Signed-off-by: HS <hs@apotell.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* initial commit

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* renamed for clarity

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* renamed for clarity

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* able to locate antlr4 runtime using ts-node, missing types

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* progressing

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* able to 'run' a test. It fails but it compiles and resolves!

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* reflect refactored runtime

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* able to run RecursiveLexerRuleRefWithWildcardPlus_1 test locally

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* passes LexerExec tests in IntelliJ

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* make ATN private

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* ignore same tests as JavaScript

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* compiles Parser and Lexer bu local run fails

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* ParserExec.TokenOffset test successful in IntelliJ !

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Progressing, passing 131 of 348 tests

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* pass 327 tests out of 348

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* more successful tests

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* 333 successful tests out of 348

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* all tests pass except 7 caused by #3868

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* update getting-started doc

Signed-off-by: nicksxs <nicksxs@hotmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* add blank github action file for hosted CI

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* update getting started document to say java 11

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Revert "update getting started document to say java 11"

This reverts commit 1df58f7.

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* add C# book code links

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Add Jim/Ken to readme

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Update Swift Package to support static library

Add static library distribution in SPM

Signed-off-by: Hell_Ghost <dev.hellghost@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Update Package.swift

Signed-off-by: Hell_Ghost dev.hellghost@gmail.com
Signed-off-by: Hell_Ghost <dev.hellghost@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Add caching support for maven & dependencies. Also, include caching for
cpp builds using actions/ccache.

Builds are more reliable (avoids the archive.apache server which
intermittently reports timeouts) and also significantly improves the
overall builds times (down from 46 mins to 28 mins).

The slowest part of the build now is the Windows+cpp builds because
there is no reliable cache implementation yet. MacOS+cpp (65% cache hit) is
also relatively slow compared to Ubuntu+cpp (99% cache hit).

Signed-off-by: HS <hs@apotell.com>
Signed-off-by: Terence Parr <parrt@antlr.org>

# Conflicts:
#	.github/workflows/hosted.yml
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* use snap to install go 1.19

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* grr...install snap

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* ugh. start snap

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* ugh. start snap

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* ugh. cant get snap to install go

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* try downloading golang with curl

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Issue #3823: Temporarily disable a few tests on CI

The tests are currently failing. The underlying issues have been fixed
on dev and so the builds will be turned back with the next release.

Signed-off-by: HS <hs@apotell.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* update actions status badge

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* update getting started document to say java 11

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Revert "update getting started document to say java 11"

This reverts commit 3591ee0.

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* update getting-started doc

Signed-off-by: nicksxs <nicksxs@hotmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* make getValue visible to external profiler tools.

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Fix #3508: Document the $parser attribute and its use in target-agnostic grammars.

Signed-off-by: Ross Patterson <ross.patterson@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Add accessor to IntervalSet for intervals

Signed-off-by: James Taylor <jamestaylor@apache.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Remove libuuid dependency from C++ runtime

libuuid and its headers are not referenced anywhere, so remove it.

Signed-off-by: Bryan Tan <bryantan@technius.net>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Add `@SuppressWarnings("CheckReturnValue")` to prevent error_prone lib errors.

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: Fixes for #3718

  o Implement collections with generics to solve hash collisions
  o Fix type casting in LL start parser simulation optimization
  o General minor tidy ups

Acknowledgements to @kaby76 for help with tracing errors

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #3718 Revert accidental keyboard error in Java target

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #3718 Correct DFAState index in Lexer ATN Simulator

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #3718 Fix go runtime test runners

With older versions of go, there was no good way to tell the compiler to use your local
development copy of a particular package instead of the one installed in GOPATH/src/...

However, we are now using modules, which allows us to tell the compiler that instead of
a module downloaded to GOPATH/pkg, to use a local copy on disk.

Hence this change removes the need to copy the whole of the go installation to a
tempoorary location, then put the antlr go runtime in to the go installation as if it was
part of the compiler. Hence the execution time for the go tests is now faster than before.

This works because when the generated code is placed in the temporary location, we create
a go.mod file for it, tell the module to replace the online module for the go runtime with
the local copy on disk, then ro a go mod tidy to add the dependencies from the code (which
avoids network access, so it is instant), which adds the ANTLR dependency itself (which is
then replaced at compile time).

All go runtime tests now pass.

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Rm remote github actions; hosted seems to work

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* install golang with curl; go was missing from dev

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: Rework of all Hash() and Equals() methods - implement generic collections

 - Implement new collections using generics that implement the functionality
   required by the Java runtime in a more idiomatic Go way.
 - Fix Hash() and Equals() for all objects in the runtime
 - Fix getConflictingAlts so that it behaves the same way as Java, using a
   new generic collection
 - Replaces the use of the array2DHashSet, which was causing unneeded memory
   allocations. Replaced with generic collection that allocates minimally
   (though, I think I can improve on that with a little analysis).

Jim Idle - jimi@idle.ws

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #3718 Correct DFAState index in Lexer ATN Simulator

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* feat: Reduce initial memory allocations for collections

  - Many small collections are created at runtime, the default allocation for
    maps, even though small, still requires memory. Specifying a very small
    initial allocation prevents unnecesary allocations and has no measurable
    effect on performance. A small incremental change.

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #3758 Allow for string being a keyword and fix go template to use escapedName

  - The go template was ignoring the use of escapedName in many places and was
    not consistenet with the Java version.
  - Added 'string' to the list of reserved words for the Go target

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #3758 Add go.sum to the repo

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #3758 Ensure that standard runtime extensions are included in go.mod

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #2826  Go template is incorrect for dynamic scopes

closes #2826
obviates PR #3101

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #2016 - Generate correct iGo code for lists in a grammar, such as `label+=arg+`

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* feat: Bump poms to use 4.11 Snapshot

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* turn off Golang test at circleci for now

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Replace smart-quote with single-quote in code examples

Signed-off-by: Tim McCormack <cortex@brainonfire.net>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Augment error message during testing to include full cause of problem.

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Augment error message during testing to include full cause of problem. (round 2 to avoid null ptr)

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Cpp: Link to threads library

As detailed in #3708, it is necessary to link against the (p)threads
library in order to be able to use std::call_once without producing
linker errors.

Since this function is frequently used in ANTLR's cpp version, this
commit ensures that the respective library is always linked against in
order to avoid this error, even if downstream users are not explicitly
linking against an appropriate threads library.

Fixes #3708

Signed-off-by: Robert Adam <dev@robert-adam.de>

Co-authored-by: Bryan Tan <Technius@users.noreply.github.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* add test for #2016 and fix java.

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* ensure all targets have the appropriate argument list for the template causing the problem.

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Fix other targets

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix format

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* add check that $args is a list

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* change made by @lingyv-li to fix bug in DART exposed by this test.

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix AssertIsList in multiple targets. Go doesn't pass test and has no AssertIsList so I'm dropping that test from the Go test suite.

How did a comment to the C++ runnerFor my future reference as to how to build things from the command line.

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* C++ gets an exception with this test so I'm turning it off. See #3845

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* feat: #3840 Move Go to version v4.11.0

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* feat: #3840 Create the v4 version of the Go runtime

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* feat: Create the v4 runtime layout for the Go runtime, ready for release tagging

Note that the vast majority of the changes here are just copying the runtime file in to
the /v4 subdirectory so that we can support legacy projects that use GOPATH only, as well
as users that can use go modules. At a later release, we will delete the default path, and move
the v4 subdirectory back to the top level. But, we cannot do that on this release.

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Reenable go tests on CircleCI

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Fold constants in generated code for all runtimes

Go: getInlineTestSetWordSize 32 -> 64
Dart: get rid of BigInt
Swift: optimize TestSetInline
Python: fixes #3698
JavaScript: fixes #3699

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Use int literals instead of refs for Python and JavaScript

Update getMultiTokenAlternativeDescriptor test

fixes #3703

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* update release doc for Go version numbers

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix: #2016 Fix Go template list reference, go runtime and got test template for list labels

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* feat: Add a deprecation message to the existing v1 module

Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Split tool and runtime tests for GitHub workflow

Build only necessary modules for tests

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Remove not used methods from FileUtils (runtime tests)

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Update dependencies of antlr4-maven-plugin

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Update jUnit: 5.8.2 -> 5.9.0

Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Fixes #3733; update ST4 so it uses proper ANTLR 3

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* tweak doc

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Set to 4.11.0 not 4.11 in poms

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* [maven-release-plugin] prepare release 4.11.0

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* [maven-release-plugin] prepare for next development iteration

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Damn. java target said 4.10.2 not 4.11.0

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* roll back to 4.11.0; made mistake

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* roll back to 4.11.0; made mistake

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* [maven-release-plugin] prepare release antlr4-master-4.11.0

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* [maven-release-plugin] prepare for next development iteration

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* use build and twine to publish source and wheel

Signed-off-by: Qijia Liu <liumeo@pku.edu.cn>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* tweak doc

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* tweak c++ build script to make Mac binaries with cmake/make

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* tweak release doc

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* tweak code / doc related to bad previous release

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* [maven-release-plugin] prepare release 4.11.1

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* [maven-release-plugin] prepare for next development iteration

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* clean up deploy c++ source script

Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* cleanup code generation

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* don't initialize default param values twice

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* add missing field

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* update codegen template for 4.11.1

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* support new param: Parser

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix template for 4.11

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* default export Listener and Visitor

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* also default export parser and lexer

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* all tests pass except 7 caused by #3868

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix issues

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* make it easy to break

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix #3868

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* ALL TESTS PASS!!!!

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* cross fingers with CI

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* try fixing broken go tests

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Try fix typescript CI

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* disable cpp for now

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix broken config

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* try fix macos gh build

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* improve speed by caching node_modules

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* no longer using ts-node

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix all tsc warnings

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* try fix MacOS CI

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* CI errors seem random, reactivate ubuntu

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Disable node_modules caching, which seems to randomly fail in CI

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* don't delete symlink contents on windows (java bug with is SymbolicLink ?)

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* fix broken windows CI

Signed-off-by: ERIC-WINDOWS\ericv <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* verify windows ci

Signed-off-by: ERIC-WINDOWS\ericv <eric.vergnaud@wanadoo.fr>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* Revert "verify windows ci"

This reverts commit 770d821.

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* reinstate full CI

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* manually merged

* manually merge

* fix merge

* fix broken template

* add template for invoking context list

* fix typo

* fix test templates

* Add code of conduct but with a different name since I do not like that name

Signed-off-by: Terence Parr <parrt@antlr.org>

* Update C# release instructions

* Tweak code of conduct

Signed-off-by: Terence Parr <parrt@antlr.org>

* Bring back the Package.swift in the project's root

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>

* swift-target.md: fix SPM installation instructions

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>

* the scope (parser or lexer) in @parser::header was dropped, so keep track of it and only include @Header in Listener and Visitor code

Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>

* drop workaround in favor of #3878

* drop cache usage since it fails in CI

* #3878 was missing some scenarios

* fix issue when deleting test folder

* fix warnings

* drop duplicate behavior

* drop alien 'abstractRecognizer' property

* drop alien property 'channels'

* fix various codegen issues

* change import

* restore js extensions, see microsoft/TypeScript#50501

* use consistent inheritance

* more API

* more API stuff

* fix typo

* fix typescript exports

* use ts-node to run typescript tests

* webpack runtime before linking

* fix exec paths on windows

Signed-off-by: ERIC-WINDOWS\ericv <eric.vergnaud@wanadoo.fr>

* fix failing tests

* fix a few import issues

* merge typescript-target with latest dev

* runs Java and JavaScript tests after merging typescript-target

* merge test template

* skip unsupported test

* fix template prototype

* fix missing merge

* bump typescript beta version after rebase

* update docs

* rollback unwanted changes

Signed-off-by: HS <hs@apotell.com>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr>
Signed-off-by: nicksxs <nicksxs@hotmail.com>
Signed-off-by: Terence Parr <parrt@antlr.org>
Signed-off-by: Hell_Ghost <dev.hellghost@gmail.com>
Signed-off-by: Hell_Ghost dev.hellghost@gmail.com
Signed-off-by: Ross Patterson <ross.patterson@gmail.com>
Signed-off-by: James Taylor <jamestaylor@apache.org>
Signed-off-by: Bryan Tan <bryantan@technius.net>
Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Tim McCormack <cortex@brainonfire.net>
Signed-off-by: Ivan Kochurkin <kvanttt@gmail.com>
Signed-off-by: Qijia Liu <liumeo@pku.edu.cn>
Signed-off-by: ERIC-WINDOWS\ericv <eric.vergnaud@wanadoo.fr>
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
Co-authored-by: HS <hs@apotell.com>
Co-authored-by: nicksxs <nicksxs@hotmail.com>
Co-authored-by: Terence Parr <parrt@antlr.org>
Co-authored-by: Hell_Ghost <dev.hellghost@gmail.com>
Co-authored-by: Ross Patterson <ross.patterson@gmail.com>
Co-authored-by: James Taylor <jamestaylor@apache.org>
Co-authored-by: Bryan Tan <bryantan@technius.net>
Co-authored-by: Jim.Idle <jimi@gatherstars.com>
Co-authored-by: Tim McCormack <cortex@brainonfire.net>
Co-authored-by: Robert Adam <dev@robert-adam.de>
Co-authored-by: Bryan Tan <Technius@users.noreply.github.com>
Co-authored-by: Ivan Kochurkin <kvanttt@gmail.com>
Co-authored-by: Qijia Liu <liumeo@pku.edu.cn>
Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants