Remix.run Logo
hsbauauvhabzb 4 hours ago

JavaScript does have some pretty insane dependency trees. Most other languages don’t have anywhere near that level of nestedness.

staminade 3 hours ago | parent | next [-]

Don't they?

I just went to crates.io and picked a random newly updated crate, which happened to be pixelfix, which fixes transparent pixels in pngs.

It has six dependencies and hundreds of transient dependencies, may of which appear to be small and highly specific a la left-pad.

https://crates.io/crates/pixelfix/0.1.1/dependencies

Maybe this package isn't representative, but it feels pretty identical to the JS ecosystem.

koakuma-chan 3 hours ago | parent [-]

It depends on `image` which in turn depends on a number of crates to handle different file types. If you disable all `image` features, it only has like 5 dependencies left.

staminade 3 hours ago | parent [-]

And all those 5 remaining dependencies have lots of dependencies of their own. What's your point?

koakuma-chan 3 hours ago | parent [-]

> What's your point?

Just defending Rust.

> 5 remaining dependencies have lots of dependencies of their own.

Mostly well-known crates like rayon, crossbeam, tracing, etc.

johnisgood 2 hours ago | parent [-]

You cannot defend Rust if this is reality.

Any Rust project I have ever compiled pulled in over 1000 dependencies. Recently it was Zed with its >2000 dependencies.

koakuma-chan an hour ago | parent [-]

I think it's justified for Zed. It does a lot of things.

cxr 3 hours ago | parent | prev | next [-]

It's not possible for a language to have an insane dependency tree. That's an attribute of a codebase.

orbital-decay an hour ago | parent | next [-]

Modern programming languages don't exist in a vacuum, they are tied to the existing codebase and libraries.

WD-42 2 hours ago | parent | prev [-]

Maybe the language should have a standard library then.

skydhash 2 hours ago | parent [-]

C library is smaller than Node.js (you won’t have HTTP). What C have is much more respectable libraries. If you add libcurl or freetype to your project, it won’t pull the whole jungle with them.

int_19h 35 minutes ago | parent [-]

What C doesn't have is an agreed-upon standard package manager. Which means that any dependency - including transitive ones! - requires some effort on behalf of the developer to add to the build. And that, in turn, puts pressure on library authors to avoid dependencies other than a few well-established libraries (like libpng or GLib),

rixed 3 hours ago | parent | prev | next [-]

This makes little sense. Any popular language with a lax package management culture will have the exact same issue, this has nothing to do with JS itself. I'm actually doing JS quasi exclusively these days, but with a completely different tool chain, and feel totally unconcerned by any of these bi-weekly NPM scandals.

BrouteMinou 2 hours ago | parent | prev [-]

Rust is working on that. It's not far behind right now, leave it a couple of years.