mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
ANTLR incompatibilities #274
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sgammon on GitHub (Feb 4, 2025).
Pkl's use of ANTLR is sometimes problematic, especially on the fork it uses, which is no longer maintained. Compiling under classpaths that embed a similar version of ANTLR (but not identical, especially from mainline) causes failures which are hard to diagnose; Pkl's ANTLR serialized data uses format
v3, but latest versions usev4, causing an error that surfaces at runtime and not compile-time.This is especially complicated because the mainline ANTLR version uses the same package as the forked ANTLR, so class loaders can easily get confused. Newer versions of GraalVM also shade ANTLR. It uses
v4. Upgrading to mainline ANTLR isn't trivial: the APIs are different and it might imply a loss in parsing performance.All of this will be fixed anyway by #917, so I am mostly filing this for documentation purposes.