walmartlabs / lacinia

GraphQL implementation in pure Clojure
http://lacinia.readthedocs.io/en/latest/
Other
1.82k stars 163 forks source link

Replace antlr4 deps with antlr4-runtime #454

Open namenu opened 9 months ago

namenu commented 9 months ago

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 commented 9 months ago

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

hlship commented 9 months ago

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!