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

Publish to crates.io

Open chipsenkbeil opened this issue 2 years ago • 8 comments

I noticed that this library has official releases with the latest being 1.2.5.

Is publishing the Rust crate planned? This would mirror other established treesitter libraries like tree-sitter-javascript and tree-sitter-md.

Would enable others to build off the library without a cargo git dependency, which is a requirement to publish a crate to crates.io.

chipsenkbeil avatar Dec 29 '22 22:12 chipsenkbeil

Who except Neovim is expected to use this parser?

clason avatar Dec 29 '22 23:12 clason

I'm using it right now to build a cli to convert vimdoc to html.

chipsenkbeil avatar Dec 29 '22 23:12 chipsenkbeil

Why not use https://github.com/neovim/neovim/blob/master/scripts/gen_help_html.lua?

clason avatar Dec 29 '22 23:12 clason

I want a standalone binary rather than needing to pull in neovim or something else to run lua, and I also need more flexibility in what and how I generate the HTML. For that script, I would need to fork the lua file (to my knowledge) to alter and maintain CSS.

I may also do a conversion to markdown so I can more cleanly integrate it into a pre-existing statically-generated website.

Is there a reason not to publish this crate? I wouldn't think a maintenance burden would be a concern since you already have the Rust support available as part of tree sitter and have releases tagged.

chipsenkbeil avatar Dec 29 '22 23:12 chipsenkbeil

For that script, I would need to fork the lua file (to my knowledge) to alter and maintain CSS.

The script outputs a help.css file, which could be replaced as needed. Though of course the HTML structure and css class names are fixed.

Is there a reason not to publish this crate?

No reason except needing to manage another account and upload process. (idk what's involved with publishing to crates)

justinmk avatar Dec 30 '22 19:12 justinmk

Is there a reason not to publish this crate?

No reason except needing to manage another account and upload process. (idk what's involved with publishing to crates)

I'm happy to help here including setting up automatic publishing through a Github action, since I have a decent background in Rust library development and crate publishing. The main challenge today with publishing is that you still need to tie crates to an owner. Not sure if neovim has any generic account that the core maintainers have access to.

From discussion about publishing:

On crates.io, crates are owned by individual users who log in directly with their personal GitHub account. Teams don't own crates and "team owners" are just an authorization mechanism that allows other GitHub users (who are part of the GH team, but not necessarily crates.io crate owners) to publish new releases.

In all cases interaction with crates.io is done via personal GitHub accounts, not via team/org account.

chipsenkbeil avatar Dec 31 '22 19:12 chipsenkbeil

github workflow to publish a treesitter crate: https://github.com/neovim/tree-sitter-c/blob/nvimc/.github/workflows/publish_crate.yml

justinmk avatar Jul 16 '23 23:07 justinmk

Upstream is experimenting with release and publish actions (using org secrets for cargo and npm); once all the issues are ironed out, we'll likely add them for all our parsers. No point in doing special things for this parser alone.

clason avatar Jul 17 '23 07:07 clason