lacinia icon indicating copy to clipboard operation
lacinia copied to clipboard

Replace antlr4 deps with antlr4-runtime

Open namenu opened this issue 1 year ago • 2 comments

The ANTLR used in the parser is a very large and heavy library, taking up around 50MB when unjarred. This makes it difficult to use Lacinia easily with AWS Lambda, etc.

Therefore, I propose to replace ANTLR with the antlr4-runtime dependency rather than the whole thing. To do this, clj-antlr needs to be removed and pre-generated java code should be interop-ed instead.

namenu avatar Feb 11 '24 09:02 namenu

I've worked on it here https://github.com/green-labs/lacinia/pull/6 and it works well in our fairly complex schema. I'd be interested to know what you think! @hlship

namenu avatar Feb 14 '24 18:02 namenu

I'm very interested in this; it's just a bit big for a bug fix release, so it'll wait for 1.3 rather than 1.2.x. I don't mind mixing a little bit of Java into my lovely Clojure code ... if there's a big payoff!

hlship avatar Feb 15 '24 02:02 hlship