CodeEditApp / CodeEditSourceEditor

A code editor view written in Swift powered by tree-sitter.
https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
MIT License
511 stars 78 forks source link

🚀 Binary Frameworks for `tree-sitter` parsers #54

Closed lukepistrol closed 1 year ago

lukepistrol commented 2 years ago

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 commented 1 year ago

Closed with #86