antlr / antlr/antlr4

Circular dependencies with stringtemplate

Open
#2,160 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
19k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

Building newer versions of antlr involves circular dependencies. Going back to antlr 2.7.7, that can build itself. String template 3.2.1 can build with that version of antlr. That is where that ends. From 3.x, and Stringtemplate 4.x you get circular dependencies. Not sure if there is a version of 3.x that can build Stringtemplate, that requires Stringtemplate < 4, like 3.2.1. Some packages still require the cross over 3.x generation that has both v2 and v3, like antlr 3.2. By 3.5 the v2 stuff was removed, so some things requiring that do not build. Nor do they build with 2.7.7. Those are upstream issues.

However I have no clean way to build > 2.7.7. antlr 3.2 requires Stringtemplate 4, as does antlr 3.5, and antlr 4.x. If I can find a version of antlr that builds Stringtemplate 4, while not requiring that version of Stringtemplate, hopefully requiring Stringtemplate 3.x. Then I can get around this issue.

Otherwise what has been done is using binaries of each to bootstrap. But that also means no clean way to build from source. Java seems to have an recurring issue with circular dependencies and requiring pre-build binaries to bootstrap. This is not really ideal and IMHO should change so things can be cleanly built from source. Thank you for your consideration of this request.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the declared build dependencies among the ANTLR 2.7.7, 3.2, 3.5, and 4.x releases and StringTemplate 3.2.1 and 4.x. Verify whether any version combination avoids the circular dependency and whether each project can be built from source without pre-built binaries; done means a clean source bootstrap is documented or the upstream limitation is clearly identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.