Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing the parser to crates.io #967

Closed
charliermarsh opened this issue Jul 7, 2023 · 10 comments
Closed

Publishing the parser to crates.io #967

charliermarsh opened this issue Jul 7, 2023 · 10 comments
Labels
enhancement New feature or request

Comments

@charliermarsh
Copy link

👋 I know there's a line in the README about publishing to crates.io, but I just wanted to upvote it and couldn't find a better avenue to do so. We use the LibCST parser to support some autofixes in Ruff, and we currently package LibCST as a Git dependency. It'd be more convenient and reliable to pull it in from crates.io (we occasionally see spurious network failures with Git dependencies), and would also enable us to publish Ruff itself to crates.io in the future.

Alternatively, if there isn't interest from the maintainers in publishing this to crates.io, is there any way you'd be open to having me publish (e.g.) an undocumented ruff_libcst package of a fork?

Thanks!

@zsol
Copy link
Member

zsol commented Jul 8, 2023

hey @charliermarsh i'd be happy to publish to crates.io if someone could contribute automation similar to the existing publishing pipeline for pypi.

@zsol zsol added the enhancement New feature or request label Jul 8, 2023
@manmartgarc
Copy link

Just to confirm, would making a GitHub workflow similar to this be sufficient?

@zsol
Copy link
Member

zsol commented Aug 26, 2023

Yes.

@jelmer
Copy link

jelmer commented Sep 2, 2023

FWIW it'd be great to see this from a Debian perspective, working on packaging ruff.

@manmartgarc
Copy link

Wondering how to handle the cargo registry token. This is about ownership of the package on the registry. After looking here it seems that it can be set as a repository secret on the GitHub repository.

I am guessing @zsol or some maintainer of LibCST would like to keep ownership of the create on the registry. Happy to hear any feedback. Apologies in advance if there is already a defined approach in the community, but this is the first time I am handling the cargo ecosystem.

@zsol
Copy link
Member

zsol commented Sep 3, 2023

Yes, Meta wants to retain ownership of the crate. I'm happy to do whatever's necessary to obtain the tokens

@zsol
Copy link
Member

zsol commented Sep 3, 2023

I've got https://crates.io/crates/libcst and https://crates.io/crates/libcst_derive published manually to make sure the names are ours, but they're both at version 0.1.0 for now.

@manmartgarc
Copy link

manmartgarc commented Sep 3, 2023

Amazing, thanks. I will probably submit the PR on dry build mode, and the exact environment variable name can be set from the repo secrets then. Edit: referring to the repo secret variable name in the PR.

@manmartgarc
Copy link

Bumping this. A PR is open for fixing this: #1012

@Apteryks
Copy link

Seems like that already happened?

@zsol zsol closed this as completed Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants