You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For most grammars, pulling from TSPM is not a big difference. It's just a smaller/faster download.
For some oddly shaped grammars like tree-sitter-ocaml or tree-sitter-typescript (multiple grammars in one repository), it helps reduce the complexity of the build: we wouldn't need the subpath config.
Other grammars like tree-sitter-rescript or alex-pinkus/tree-sitter-swift (don't store generated C files in the git repo, #1964) would benefit more concretely. We wouldn't need to maintain any forks that check the generated C into the repo.
As a bonus for Nix packaging, the pkgs.tspm.io links contain the SHA256 hash of the file, which we can use it to construct a fixed-output-derivation (FODs can be cached infinitely which solves #1779).
The [[grammar]] config in languages.toml should accept a new source which would be used like so:
[[grammar]]
name = "elixir"source = { url = "https://pkgs.tspm.io/elixir/elixir-lang/a11a686303355a518b0a45dea7c77c5eebb5ec22-0.20.6-13-956eb868f38544dedcd5ef45f0ecc7cab542c68b89fae631e149008ad5cc72e8-src.tar.gz" }
Implementation-wise we have two kinda bad options:
take a dependency on a Rust HTTP client
take a runtime dependency on curl or similar
I lean towards (2). So we'd be switching from having a runtime dependency on git to curl. That's not super ideal but I think it's acceptable: you only need curl if you want to hx -g fetch, and package-managers pre-fetch and build grammars, so most users will not need to care about this at all.
The text was updated successfully, but these errors were encountered:
I've been working on improving packaging in https://github.com/helix-editor/tspm and IMO it's pretty close to being usable for all grammars.
For most grammars, pulling from TSPM is not a big difference. It's just a smaller/faster download.
For some oddly shaped grammars like
tree-sitter-ocaml
ortree-sitter-typescript
(multiple grammars in one repository), it helps reduce the complexity of the build: we wouldn't need thesubpath
config.Other grammars like
tree-sitter-rescript
oralex-pinkus/tree-sitter-swift
(don't store generated C files in the git repo, #1964) would benefit more concretely. We wouldn't need to maintain any forks that check the generated C into the repo.As a bonus for Nix packaging, the
pkgs.tspm.io
links contain the SHA256 hash of the file, which we can use it to construct a fixed-output-derivation (FODs can be cached infinitely which solves #1779).The
[[grammar]]
config inlanguages.toml
should accept a newsource
which would be used like so:Implementation-wise we have two kinda bad options:
curl
or similarI lean towards (2). So we'd be switching from having a runtime dependency on
git
tocurl
. That's not super ideal but I think it's acceptable: you only needcurl
if you want tohx -g fetch
, and package-managers pre-fetch and build grammars, so most users will not need to care about this at all.The text was updated successfully, but these errors were encountered: