tree-sitter-julia icon indicating copy to clipboard operation
tree-sitter-julia copied to clipboard

project status

Open tpapp opened this issue 2 years ago • 3 comments

We have been considering using tree-sitter for julia-mode (Emacs), see discussion at JuliaEditorSupport/julia-emacs#174.

Experimenting with tree-sitter-julia, it is my impression that it is fast and robust. However, before we explore this, I wanted to ask maintainers for feedback: is the implementation still WIP, or is it intended for production?

In particular, our current regexp-based solutions also have quite a few bugs and corner cases (as expected), so we can live with a few of those, and also expect to contribute fixes if we can. If PRs get reviewed and merged in a timely manner, that would be perfectly fine for our purposes.

tpapp avatar Jun 08 '22 08:06 tpapp

As another data point, we have been using this parser for Neovim for a while without many issues (https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/julia). Although there was a bit of a lull here for a while, the activity has picked up in recent weeks, so I would consider this repo maintained.

That being said, if more maintainers are needed, we'd be willing to help out!

clason avatar Jun 08 '22 08:06 clason

I made the most recent PRs to the repo, so I'd like to give my opinion:

I mostly agree with the comments on the linked emacs thread. Using tree-sitter seems simpler than using CSTParser.

I'd say the repo is maintained. As far as I know, @maxbrunsfeld is the only one with commit rights, and he's not actively commiting to the repo, but he's taken the time to review the PRs I've sent. Personally, I'd like to keep contributing here. I've learnt a lot about parsing and metaprogramming while learning Julia.

The grammar is ok. Most of the rules are what you'd expect. The femtolisp parser is dense, and translating it in a sensible way often leaves many edge-cases. There are some constructs that are still not parsed correctly that can cause "white-outs" (e.g. mime types). I'd advise against small fixes. If there's a small parsing error, it's better to do TDD and try to nail all issues related to one construct in one go.

savq avatar Jun 10 '22 00:06 savq

Are there any incentives to update the deps to 0.20?

VarLad avatar Jun 14 '22 00:06 VarLad

@maxbrunsfeld have you thought about adding another maintainer to this repo? The Julia parser has a lot of issues. Most fixes should be trivial, but in its current state it takes a very long time to get things merged.

I would propose @savq, who did all the recent large PR's.

ChrHorn avatar Oct 30 '22 11:10 ChrHorn

I'm closing this issue, since the grammar is now mostly done.

There's very few parsing errors remaning. I'll try to open more specific and organized issues for those.

There's also some work to be done to improve performance and compile times. Adding emojis and juxtapositions really inflated the size of the generated parser 💩

savq avatar Dec 26 '22 23:12 savq