5 ms·
https://wiki.alopex.li/LetsBeRealAboutDependencies https://wiki.alopex.li/LetsBeRealAboutDependencies > These complaints are valid, but my argument is that the
by steveklabnik 6y ago
https://wiki.alopex.li/LetsBeRealAboutDependencies https://wiki.alopex.li/LetsBeRealAboutDependencies
> These complaints are valid, but my argument is that they’re also not NEW, and they’re certainly not unique to Rust ... The only thing new about it is that programmers are exposed to more of the costs of it up-front.
- k__ 6y ago"It has always been that way." doesn't seem to be a helpful statement here.
- stjohnswarts 6y agoYes but people often throw out empty criticism without offering solutions or alternatives and it gets annoying after a while and is just a complaint rather than a healthy critique. As programmers we've heard them all before I guarantee it, so why add another one to the pile?
- steveklabnik 6y agoI mean, in some sense you're right, but in another, the point is that it's not a regression.
- k__ 6y agoTrue. Also, I coud imagine Rust's type-system raises the bar of dependencies that can be mangaged before everything breaks down. So a lib with 100 deps in NPM isn't the same as a lib with 100 deps in Cargo.
- tracker1 6y agoIf you lock to specific versions, I don't think it differs much. Edit: I mean if you don't use ~ or ^ in your nose dependencies,. Just explicit versions.
- svnpenn 6y agoHm, this response essentially says "other languages have this problem too, so deal with it". While thats true, it completely misses the point. The point is not that dependencies exist, or even that a package might have many dependencies. The point is, Rust (and NPM) I have found many times dont care or even consider the impact of a large amount of dependencies, and often take no steps to mitigate or reduce that number. As others said, some features could be split off into other crates. Maybe someone only needs HTTP, or maybe they need HTTPS but no Async. Or maybe they dont need logging. With Hyper and others you just have to build everything whether you want it or not.
- jandrese 6y ago> other languages have this problem too, so deal with it This is the primary reason I try to avoid projects built with npm. Fucking dependency hell. If the project hasn't been actively maintained in the last 3 months your chances of getting it to work drop precipitously.
- deckard1 6y agoGithub and npm are both graveyards filled with dead JS libraries. They make it too easy to litter the universe with sub-par orphaned software. And somehow, it's up to each individual to filter it all out. You have critical software such as React sitting next to mountains of bad nonsense code. And they are all on equal footing. People love to trash Perl on HN. But among many other things that Perl devs understood, they deeply understood issues that come up with dependencies. Most CPAN modules are namespaced, have unit tests, and unit tests run when modules are installed. Not only that, the people behind CPAN understood that it is a community effort and you, as a library author, have certain responsibilities to your community. https://pause.perl.org/pause/query?ACTION=pause_04about https://pause.perl.org/pause/query?ACTION=pause_04about None of that exists in npm. We have scopes in npm, and that's about it. CPAN makes npm look like a child's toy.
- stjohnswarts 6y agoCan you point out any projects that have gone off the rails because of dependencies? I mean otherwise it's just "what if" syndrome.
- asveikau 6y ago> The only thing new about it is that programmers are exposed to more of the costs of it up-front. That's funny, because it's only "new" if your experiences primarily lie in newer languages and communities. There's a lot of criticism of C, but one thing it does is make dependencies pretty explicit. Some say that's good, some say that's bad, I guess it can be both at different times.
- dagenix 6y agoI don't believe that's accurate in general. Let's say you open up a new C codebase: What are its dependencies? You'll have to hunt through its README (hopefully it's up to date!), other build instructions, maybe CMake, maybe some custom build system, etc. What version of dependencies does it use? If the code has been vendored, you at least know what code its using - but where do you look for updates to that code? Do you manually go out to wherever it was copied from now and then and look for updates? If the code isn't vendored, then how was it installed? From the package manager? If so, what operating system and version was used during development? If its not from a package, its might have been downloaded and installed manually? Again, where was it downloaded from? Where was it installed? What options did it use when it was compiled? How do you handle transitive dependencies? Probably by hand. How well documented are they? C suffers plenty of dependency issues.
- jdright 6y agoThis. Take even CURL as an example, try to list its dependencies and you'll see how harder it is.
- tick_tock_tick 6y agolibc that's it. Every other dependency for curl is optional.....
- jdright 6y agoTry it. If you do not use any "optional" dependency it becomes pretty limited, almost useless for anything serious (eg. zlib, ssl)
- ori_b 6y agoSaying "The people complaining are right, but they've been right a long time" isn't a great endorsement of the situation.
- geodel 6y agoIt seems to me Rust folks have developed this habit of deflecting blame by pointing to shallow commentary. One of good examples is compiler slowness reasons, sometimes its LLVM, or it is lot of optimizations, or it is not really slow compare to C++ and so on. They could have said it straight "Guys highly optimized, safe compilation of medium size project will be in range of 20-30 min". And that would great and honest way to deal. Instead we get oh, we have reduced compile times from 26 minutes to 21 minutes so it is 19% improvement in just one year and there is more to come. Now this is hard work and great but I am sure Rust committers understand when people say fast compile times they most likely comparing to Go etc which would be under a minute for most mid size projects. And this is very well not going to happen. Same is now to Cargo dependency situation. Cargo and NPM are ideologically in agreement that people in general should just pull it from package manager instead of rewriting even little bit of code. And again instead of owning it there will be list of shallow reasoning: others do it too, reusing is better that rewriting, cargo is so awesome that pulling crate is much easier and so on.
- staticassertion 6y agoYour argument seems to be "people see problems and other people explain why those problems exist" and somehow you frame it like it's a bad thing.
- geodel 6y agoNo my point is Rust fans try to win very narrow technical arguments even when they should clearly know discussion is about big picture. And yes it seems bad thing to me.
- staticassertion 6y ago