Skip to content

CI: Install adjusted antlr4-tools with better sonatype url#273

Draft
amotl wants to merge 1 commit intomainfrom
antlr-tools-better-sonatype-url
Draft

CI: Install adjusted antlr4-tools with better sonatype url#273
amotl wants to merge 1 commit intomainfrom
antlr-tools-better-sonatype-url

Conversation

@amotl
Copy link
Copy Markdown
Member

@amotl amotl commented Apr 30, 2026

@amotl
Copy link
Copy Markdown
Member Author

amotl commented Apr 30, 2026

Hi @rdelaage,

thanks for your suggestion at antlr/antlr4-tools#22 (comment). We've implemented it per antlr/antlr4-tools#24, but downstream validations fail our CI here. Navigating there is likely impossible because of ongoing GitHub woes, so let me replicate the traceback here:

Traceback (most recent call last):
  File "/path/to/cratedb_sqlparse_py/.venv/bin/antlr4", line 10, in <module>
    sys.exit(tool())
             ~~~~^^
  File "/path/to/cratedb_sqlparse_py/.venv/lib/python3.14/site-packages/antlr4_tool_runner.py", line 143, in tool
    run_cli('org.antlr.v4.Tool')
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/path/to/cratedb_sqlparse_py/.venv/lib/python3.14/site-packages/antlr4_tool_runner.py", line 134, in run_cli
    args, version = process_args()
                    ~~~~~~~~~~~~^^
  File "/path/to/cratedb_sqlparse_py/.venv/lib/python3.14/site-packages/antlr4_tool_runner.py", line 128, in process_args
    args.version or os.environ.get("ANTLR4_TOOLS_ANTLR_VERSION") or latest_version()
                                                                    ~~~~~~~~~~~~~~^^
  File "/path/to/cratedb_sqlparse_py/.venv/lib/python3.14/site-packages/antlr4_tool_runner.py", line 33, in latest_version
    latest = antlr_info['latestVersion']
             ~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'latestVersion'

If you compare the output, for example using httpie, you can see a difference between Sonatype and Maven Central. With the former, and your proposed URL syntax, the output is missing a latestVersion attribute, and also yields way more result items than the second response to the request to Maven Central.

http 'https://central.sonatype.com/solrsearch/select?q=a:antlr4-master+AND+g:org.antlr'
http 'https://search.maven.org/solrsearch/select?q=a:antlr4-master+AND+g:org.antlr'

Is it a different kind of bug / inconveniency we are discovering here?

With kind regards,
Andreas.

@amotl amotl marked this pull request as draft April 30, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant