From 80773cf0493953917f897f748adc4be116e4e4da Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Mon, 4 Sep 2023 13:25:39 -0700 Subject: [PATCH] Update more 4.13.0 strings to 4.13.1 --- doc/go-target.md | 8 +- doc/releasing-antlr.md | 92 +++++++++---------- .../Antlr4Tests/RuntimeMetaDataTests.swift | 1 + 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/doc/go-target.md b/doc/go-target.md index 18b496c55b..c03128cb53 100644 --- a/doc/go-target.md +++ b/doc/go-target.md @@ -91,8 +91,8 @@ golang.org/x/exp ``` A complete list of releases can be found on [the release page](https://github.com/antlr/antlr4/releases). The Go -runtime will be tagged using standard Go tags, so release 4.13.0 in the `antlr4-go/antlr` repo, will be tagged with -`v4.13.0` and go get will pick that up from the ANTLR repo. +runtime will be tagged using standard Go tags, so release 4.13.1 in the `antlr4-go/antlr` repo, will be tagged with +`v4.13.1` and go get will pick that up from the ANTLR repo. #### 3. Configuring `go generate` in your project @@ -108,7 +108,7 @@ place the ANTLR grammar files in their own package in your project structure. He ├── myproject ├── parser │ ├── mygrammar.g4 - │ ├── antlr-4.13.0-complete.jar + │ ├── antlr-4.13.1-complete.jar │ ├── generate.go │ └── generate.sh ├── parsing # Generated code goes here @@ -133,7 +133,7 @@ And the `generate.sh` file will look similar to this: ```shell #!/bin/sh - alias antlr4='java -Xmx500M -cp "./antlr-4.13.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool' + alias antlr4='java -Xmx500M -cp "./antlr-4.13.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool' antlr4 -Dlanguage=Go -no-visitor -package parsing *.g4 ``` diff --git a/doc/releasing-antlr.md b/doc/releasing-antlr.md index 80fc4e36cd..dfb6be3e7a 100644 --- a/doc/releasing-antlr.md +++ b/doc/releasing-antlr.md @@ -25,21 +25,21 @@ Make sure this feature is turned on for the `antlr4` repo upon release. Wack any existing tag as mvn will create one and it fails if already there. ``` -$ git tag -d 4.13.0 -$ git push origin :refs/tags/4.13.0 -$ git push upstream :refs/tags/4.13.0 +$ git tag -d 4.13.1 +$ git push origin :refs/tags/4.13.1 +$ git push upstream :refs/tags/4.13.1 ``` ### Go release tags *I don't think this is necessary anymore as we have moved it release branch to https://github.com/antlr4-go/antlr* -It seems that [Go needs a `v` in the release git tag](https://go.dev/ref/mod#glos-version) so make sure that we double up with 4.13.0 and v4.13.0. +It seems that [Go needs a `v` in the release git tag](https://go.dev/ref/mod#glos-version) so make sure that we double up with 4.13.1 and v4.13.1. ``` -$ git tag -a runtime/Go/antlr/v4/v4.13.0 -m "Go runtime module only" -$ git push upstream runtime/Go/antlr/v4/v4.13.0 -$ git push origin runtime/Go/antlr/v4/v4.13.0 +$ git tag -a runtime/Go/antlr/v4/v4.13.1 -m "Go runtime module only" +$ git push upstream runtime/Go/antlr/v4/v4.13.1 +$ git push origin runtime/Go/antlr/v4/v4.13.1 ``` @@ -77,7 +77,7 @@ Commit to repository. ### PHP runtime -We only have to copy the PHP runtime into the ANTLR repository to run the unittests. But, we still need to bump the version to 4.13.0 in `~/antlr/code/antlr-php-runtime/src/RuntimeMetaData.php` in the separate repository, commit, and push. +We only have to copy the PHP runtime into the ANTLR repository to run the unittests. But, we still need to bump the version to 4.13.1 in `~/antlr/code/antlr-php-runtime/src/RuntimeMetaData.php` in the separate repository, commit, and push. ``` cd ~/antlr/code/antlr-php-runtime/src @@ -94,19 +94,19 @@ git push origin master ## Build XPath parsers -This section addresses a [circular dependency regarding XPath](https://github.com/antlr/antlr4/issues/3600). In the java target I avoided a circular dependency (gen 4.13.0 parser for XPath using 4.13.0 which needs it to build) by hand building the parser: runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java. Probably we won't have to rerun this for the patch releases, just major ones that alter the ATN serialization. +This section addresses a [circular dependency regarding XPath](https://github.com/antlr/antlr4/issues/3600). In the java target I avoided a circular dependency (gen 4.13.1 parser for XPath using 4.13.1 which needs it to build) by hand building the parser: runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java. Probably we won't have to rerun this for the patch releases, just major ones that alter the ATN serialization. ```bash cd ~/antlr/code/antlr4/runtime/Cpp/runtime/src/tree/xpath -java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13.0-SNAPSHOT/antlr4-4.13.0-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Cpp XPathLexer.g4 +java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13.1-SNAPSHOT/antlr4-4.13.1-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Cpp XPathLexer.g4 cd ~/antlr/code/antlr4/runtime/CSharp/src/Tree/Xpath -java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13-0-SNAPSHOT/antlr4-4.13-0-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=CSharp XPathLexer.g4 +java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13.1-SNAPSHOT/antlr4-4.13.1-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=CSharp XPathLexer.g4 cd ~/antlr/code/antlr4/runtime/Python3/tests/expr -java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13-0-SNAPSHOT/antlr4-4.13-0-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Python3 Expr.g4 +java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13.1-SNAPSHOT/antlr4-4.13.1-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Python3 Expr.g4 cd ~/antlr/code/antlr4/runtime/Python3/src/antlr4/xpath -java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13-0-SNAPSHOT/antlr4-4.13-0-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Python3 XPathLexer.g4 +java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.13.1-SNAPSHOT/antlr4-4.13.1-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Python3 XPathLexer.g4 ``` ## Maven Repository Settings @@ -156,7 +156,7 @@ Here is the file template ## Maven deploy snapshot -The goal is to get a snapshot, such as `4.13.0-SNAPSHOT`, to the staging server: [antlr4 tool](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4/4.13.0-SNAPSHOT/) and [antlr4 java runtime](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4-runtime/4.13.0-SNAPSHOT/). +The goal is to get a snapshot, such as `4.13.1-SNAPSHOT`, to the staging server: [antlr4 tool](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4/4.13.1-SNAPSHOT/) and [antlr4 java runtime](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4-runtime/4.13.1-SNAPSHOT/). Do this: @@ -227,18 +227,18 @@ It will start out by asking you the version number: ``` ... -What is the release version for "ANTLR 4"? (org.antlr:antlr4-master) 4.13.0: : 4.13.0 -What is the release version for "ANTLR 4 Runtime"? (org.antlr:antlr4-runtime) 4.13.0: : -What is the release version for "ANTLR 4 Tool"? (org.antlr:antlr4) 4.13.0: : -What is the release version for "ANTLR 4 Maven plugin"? (org.antlr:antlr4-maven-plugin) 4.13.0: : -What is the release version for "ANTLR 4 Runtime Test Generator"? (org.antlr:antlr4-runtime-testsuite) 4.13.0: : -What is the release version for "ANTLR 4 Tool Tests"? (org.antlr:antlr4-tool-testsuite) 4.13.0: : -What is SCM release tag or label for "ANTLR 4"? (org.antlr:antlr4-master) antlr4-master-4.13.0: : 4.13.0 -What is the new development version for "ANTLR 4"? (org.antlr:antlr4-master) 4.13.1-SNAPSHOT: +What is the release version for "ANTLR 4"? (org.antlr:antlr4-master) 4.13.1: : 4.13.1 +What is the release version for "ANTLR 4 Runtime"? (org.antlr:antlr4-runtime) 4.13.1: : +What is the release version for "ANTLR 4 Tool"? (org.antlr:antlr4) 4.13.1: : +What is the release version for "ANTLR 4 Maven plugin"? (org.antlr:antlr4-maven-plugin) 4.13.1: : +What is the release version for "ANTLR 4 Runtime Test Generator"? (org.antlr:antlr4-runtime-testsuite) 4.13.1: : +What is the release version for "ANTLR 4 Tool Tests"? (org.antlr:antlr4-tool-testsuite) 4.13.1: : +What is SCM release tag or label for "ANTLR 4"? (org.antlr:antlr4-master) antlr4-master-4.13.1: : 4.13.1 +What is the new development version for "ANTLR 4"? (org.antlr:antlr4-master) 4.13.2-SNAPSHOT: ... ``` -Maven will go through your pom.xml files to update versions from 4.13.0-SNAPSHOT to 4.13.0 for release and then to 4.13.1-SNAPSHOT after release, which is done with: +Maven will go through your pom.xml files to update versions from 4.13.1-SNAPSHOT to 4.13.1 for release and then to 4.13.2-SNAPSHOT after release, which is done with: ```bash mvn release:perform -Darguments="-DskipTests" @@ -252,7 +252,7 @@ Now, go here: and on the left click "Staging Repositories". You click the staging repo and close it, then you refresh, click it and release it. It's done when you see it here: -    [https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar](https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar) +    [https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.13.1/antlr4-runtime-4.13.1.jar](https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.13.1/antlr4-runtime-4.13.1.jar) All releases should be here: [https://repo1.maven.org/maven2/org/antlr/antlr4-runtime](https://repo1.maven.org/maven2/org/antlr/antlr4-runtime). @@ -276,7 +276,7 @@ Move (and zip) target to website: ```bash cd src -zip -r ~/antlr/sites/website-antlr4/download/antlr-javascript-runtime-4.13.0.zip . +zip -r ~/antlr/sites/website-antlr4/download/antlr-javascript-runtime-4.13.1.zip . ``` ### CSharp @@ -367,7 +367,7 @@ On a Mac (with XCode 7+ installed): ```bash cd ~/antlr/code/antlr4/runtime/Cpp ./deploy-macos.sh -cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.0-macos.zip +cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.1-macos.zip ``` On any Mac or Linux machine: @@ -375,7 +375,7 @@ On any Mac or Linux machine: ```bash cd ~/antlr/code/antlr4/runtime/Cpp ./deploy-source.sh -cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.0-source.zip +cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.1-source.zip ``` On a Windows machine the build scripts checks if VS 2017 and/or VS 2019 are installed and builds binaries for each, if found. This script requires 7z to be installed (http://7-zip.org then do `set PATH=%PATH%;C:\Program Files\7-Zip\` from DOS not powershell). @@ -383,16 +383,16 @@ On a Windows machine the build scripts checks if VS 2017 and/or VS 2019 are inst ```bash cd ~/antlr/code/antlr4/runtime/Cpp deploy-windows.cmd Community -cp antlr4-cpp-runtime-vs2019.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.0-vs2019.zip +cp antlr4-cpp-runtime-vs2019.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.1-vs2019.zip ``` Move target to website (**_rename to a specific ANTLR version first if needed_**): ```bash pushd ~/antlr/sites/website-antlr4/download -git add antlr4-cpp-runtime-4.13.0-macos.zip -git add antlr4-cpp-runtime-4.13.0-windows.zip -git add antlr4-cpp-runtime-4.13.0-source.zip +git add antlr4-cpp-runtime-4.13.1-macos.zip +git add antlr4-cpp-runtime-4.13.1-windows.zip +git add antlr4-cpp-runtime-4.13.1-source.zip git commit -a -m 'update C++ runtime' git push origin gh-pages popd @@ -419,7 +419,7 @@ Otherwise enter `N` to ignore the warning. Jars are in: ``` -~/.m2/repository/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0 +~/.m2/repository/org/antlr/antlr4-runtime/4.13.1/antlr4-runtime-4.13.1 ``` ### Update version and copy jars / api @@ -428,36 +428,36 @@ Copy javadoc and java jars to website using this script: ```bash cd ~/antlr/code/antlr4 -python scripts/deploy_to_website.py 4.12.0 4.13.0 +python scripts/deploy_to_website.py 4.13.0 4.13.1 ``` Output: ```bash -Updating ANTLR version from 4.12.0 to 4.13.0 +Updating ANTLR version from 4.13.0 to 4.13.1 Set ANTLR website root (default /Users/parrt/antlr/sites/website-antlr4): Version string updated. Please commit/push: Javadoc copied: - api/Java updated from antlr4-runtime-4.13.0-javadoc.jar - api/JavaTool updated from antlr4-4.13.0-javadoc.jar + api/Java updated from antlr4-runtime-4.13.1-javadoc.jar + api/JavaTool updated from antlr4-4.13.1-javadoc.jar Jars copied: - antlr-4.13.0-complete.jar - antlr-runtime-4.13.0.jar + antlr-4.13.1-complete.jar + antlr-runtime-4.13.1.jar Please look for and add new api files!! Then MANUALLY commit/push: -git commit -a -m 'Update website, javadoc, jars to 4.13.0' +git commit -a -m 'Update website, javadoc, jars to 4.13.1' git push origin gh-pages ``` @@ -465,7 +465,7 @@ Once it's done, you must do the following manually: ``` cd ~/antlr/sites/website-antlr4 -git commit -a -m 'Update website, javadoc, jars to 4.13.0' +git commit -a -m 'Update website, javadoc, jars to 4.13.1' git push origin gh-pages ``` @@ -477,9 +477,9 @@ cd ~/antlr/sites/website-antlr4/api git checkout gh-pages git pull origin gh-pages cd Java -jar xvf ~/.m2/repository/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0-javadoc.jar +jar xvf ~/.m2/repository/org/antlr/antlr4-runtime/4.13.1/antlr4-runtime-4.13.1-javadoc.jar cd ../JavaTool -jar xvf ~/.m2/repository/org/antlr/antlr4/4.13.0/antlr4-4.13.0-javadoc.jar +jar xvf ~/.m2/repository/org/antlr/antlr4/4.13.1/antlr4-4.13.1-javadoc.jar git commit -a -m 'freshen api doc' git push origin gh-pages ``` diff --git a/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift b/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift index 26f407428e..2f9f0c08e3 100644 --- a/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift +++ b/runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift @@ -38,6 +38,7 @@ class RuntimeMetaDataTests: XCTestCase { doGetMajorMinorVersionTest("4.12.0", "4.12") doGetMajorMinorVersionTest("4.13.0-SNAPSHOT", "4.13") doGetMajorMinorVersionTest("4.13.0", "4.13") + doGetMajorMinorVersionTest("4.13.1", "4.13") } }