4 ms·
Well, your typical Rust project has over 1000 dependencies, too. Zed has over 2000 in release mode.
by johnisgood 1y ago
Well, your typical Rust project has over 1000 dependencies, too. Zed has over 2000 in release mode.
- spoiler 1y agoNot saying this in defence of Rust or Cargo, but often times those dependencies are just different versions of the same thing. In a project at one of my previous companies, a colleague noticed we had LOADS of `regex` crate versions. Forgot the number but it was well over 100
- treyd 1y agoThat seems like a failure in workspace management. The most duplicates I've seen was 3, with crates like url or uuid, even in projects with 1000+ distinct deps.
- deleted 1y ago[deleted]
- burntsushi 1y agoThat doesn't make sense. The most it could be is 3: regex 0.1.x, regex 0.2.y and regex 1.a.b. You can't have more because Cargo unifies on semver compatible versions and regex only has 3 semver incompatible releases. Plus, regex 1.0 has been out for eons. Pretty much everyone has moved off of 0.1 and 0.2.
- spoiler 1y agoThe reason he went down this rabbit hole was because he was chronically running low on disk space, and his target dir was one of the largest contributors. Not sure how he actually got the number; this was just a frustrated Slack message like 4 years ago A sibling comment mentions we could have been using Cargo workspaces wrong... So, maybe?
- burntsushi 1y agoHe probably just needed to run `cargo clean` occasionally. But you definitely aren't finding hundreds of versions of `regex` in the same dependency tree.
- Klonoar 1y agoYour typical Rust project does not have over 1000 dependencies. Zed is not a typical Rust project; it's a full fledged editor that includes a significant array of features and its own homegrown UI framework.
- worik 1y agoWhat is a "typical Rust project", I wonder?
- cesarb 1y agoOne famous example is ripgrep (https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep). Its Cargo.lock (which contains all direct and indirect dependencies) lists 65 dependencies (it has 66 entries, but one of them is for itself).
- burntsushi 1y agoAlso, that lock file includes development dependencies and dependencies for opt-in features like PCRE2. A normal `cargo build` will use quite a bit fewer than 65 dependencies. I would actually say ripgrep is not especially typical here. I put a lot of energy into keeping my dependency tree slim. Many Rust applications have hundreds of dependencies. We aren't quite at thousands of dependencies yet though.
- johnisgood 1y ago> I would actually say ripgrep is not especially typical here. I put a lot of energy into keeping my dependency tree slim. Many Rust applications have hundreds of dependencies. Thank you for your honesty, and like you and I said, you put a lot of energy into keeping the dependency tree slim. This is not as common as one would like to believe.
- burntsushi 1y agoI agree it's not common. But neither are Rust applications with 1000+ dependencies. I don't think I've ever compiled a Rust project with over 1,000 dependencies. Hundreds? Yes, absolutely. That's common.