ruff icon indicating copy to clipboard operation
ruff copied to clipboard

Enable installation via cargo

Open charliermarsh opened this issue 3 years ago • 12 comments

We can't upload to crates.io because we're using an unreleased version of RustPython.

charliermarsh avatar Aug 29 '22 17:08 charliermarsh

I've asked about publishing Ruff's RustPython fork here: https://github.com/RustPython/RustPython/issues/4179

charliermarsh avatar Sep 24 '22 14:09 charliermarsh

Regardless we are ready or not, I want to distribute rustpython-parser before ruff 0.1. Please poke me when you are ready for 0.1. I seriously don't want to block ruff's schedule by our fault.

youknowone avatar Oct 15 '22 05:10 youknowone

@youknowone - Thank you, that's really helpful and appreciated.

There are a few PRs I'd need to merge to move off of my RustPython fork (which is largely ahead of main) -- I know you know about some of these, but I'll just enumerate them here for completeness:

  • https://github.com/RustPython/RustPython/pull/4192
  • https://github.com/RustPython/RustPython/pull/4143
  • (Not totally essential) https://github.com/charliermarsh/RustPython/pull/3
  • https://github.com/RustPython/RustPython/pull/4218

charliermarsh avatar Oct 15 '22 14:10 charliermarsh

RustPython just cut a new release on crates.io. So the only blocker here is (1) confirming that we want to use the Crate, which might mean we're a little slower to pick up changes from Git; and (2) LibCST is still using my unpublished fork (which just removes pyo3 stuff).

charliermarsh avatar Jan 11 '23 16:01 charliermarsh

Hey! I was looking at adding documentation for installation from crates.io then realized it wasn't supported :D

  1. Is it feasible to use RustPython from Git for other releases and only publish to crates.io if the published RustPython version has the sufficient changes? Is that worth the trouble?

  2. Is this resolved now?

zanieb avatar Jun 03 '23 18:06 zanieb

I think there are three blockers here that we'd need to resolve, since, in order to publish to crates.io, we can't have any Git dependencies in the dependency tree:

  1. Publish our parser fork as their own crates (https://github.com/astral-sh/RustPython-Parser), e.g., ruff_rustpython_parser or similar.
  2. In RustPython (and our fork), remove the Git dependency on unicode_names2.
  3. Publish our LibCST fork as its own crate (https://github.com/charliermarsh/LibCST/tree/charlie/ruff).

charliermarsh avatar Jun 03 '23 19:06 charliermarsh

Related https://github.com/RustPython/Parser/issues/67

zanieb avatar Jun 03 '23 21:06 zanieb

I'd like to grant publish permission of parser to anyone from Ruff who need it. I didn't finish unicode_names2 patch to merge it yet. I need to port the implementation to its own phf.

youknowone avatar Jun 04 '23 08:06 youknowone

I think all mentioned blockers are gone, Are there any new?

T-256 avatar Oct 17 '23 15:10 T-256

Yes now that we've resolved the blockers we are considering publishing to crates.io but have not come to a decision yet.

zanieb avatar Oct 17 '23 15:10 zanieb

Has there been any update on this (or would cargo install --git https://github.com/astral-sh/ruff ruff work: seems to install but I'm not sure if there's tests I can run to confirm: does seem to be working on code I have)

KGrewal1 avatar Feb 18 '24 10:02 KGrewal1

@KGrewal1 -- cargo install --git https://github.com/astral-sh/ruff ruff should work just fine! I tested it myself too.

charliermarsh avatar Feb 18 '24 14:02 charliermarsh