CodeEditSourceEditor icon indicating copy to clipboard operation
CodeEditSourceEditor copied to clipboard

👀 Binary Frameworks for `tree-sitter` parsers

Open lukepistrol opened this issue 1 year ago • 0 comments

Current Situation

Currently all tree-sitter parsers are fetched from source every time Swift Package Manager resolves dependencies. This can easily take a couple of minutes even with a good internet connection. This also applies to the CodeEdit repo.

Proposal

Since Languages usually don't need to be updated very often, they could be bundled as pre-built *.xcframework binaries in an extra repository. This would also include the CodeLanguage class. By doing so the fetching occurs only from a single Swift Package which in turn hugely benefits package resolution.

Further Information

Once there are additional languages or updates to existing ones, it's as simple as running a script to re-build the frameworks.

I know this sounds like a lot of overhead but I think in the long term this will pay off since waiting for packages to fetch/resolve on a daily basis definitely adds up.

I'm curious what you guys think about this!

lukepistrol avatar Aug 16 '22 23:08 lukepistrol