Hacker News new | ask | show | jobs
by 7bit 38 days ago
I don't. Formatting and linting does not belong into a package manager.
4 comments

uv manages the entire project. It is not just a different pip.
That's how Rust's Cargo and Elixir's Mix both work.
For cargo, not quite.

rustfmt is what implements Rust formating. However rustfmt is also distributed via rustup (Rust's toolchain manager). There it is also exposed under the alias cargo-fmt, which makes it work as cargo subcommand `cargo fmt` (a mechanism that's available to any crate). So it's technically not "part of cargo".

Of course the nature of all of this is a bit different, as Rust maintains cargo, rustfmt and a lot more dev tooling as part of it's official teams in comparison to other language ecosystems, where focus is on the compiler only.

From a user's point of view and an operational standpoint, that is how they work. Mix is the same way in terms of calling tools as subcommands. But it doesn't matter. You get a default experience with `cargo` and `mix` driving everything.
The use case in the article though is type checking standalone scripts with declared dependencies. So it kind of needs some kind of package management + type checking utility at the same time.
Why not?
because a package manager manages packages, while a formatter formats source code and a type checker checks types.

the type check is background process for lsp and a quality gate in your process.

formatting likewise with a stronger Fokus on pre-commit

packaging (and build for packaging) may or may not be gated with the former two but it's a (pre)release and deployment activity.

The very first line of https://docs.astral.sh/uv/ states that uv is more than a package manager: "An extremely fast Python package and project manager, written in Rust."
what is a "project manager" in this context?

I think it's safe to say most of us who use `uv` use it as a package manager.

Here is some of what Astral has to say about it: https://docs.astral.sh/uv/concepts/projects/
upstream has created hatchling for the other part of uv indeed