▲ | spacebanana7 4 days ago | |||||||||||||||||||||||||||||||||||||
> "This is the automation of dependency hell. The problem is that not everything needs to be automated, especially hell. Dependency hell is a real thing which anyone who has worked on a large project has experienced. Projects having thousands, if not tens of thousands, of dependencies where you don’t know if they work properly, where are the bugs, you don’t how anything is being handled—it’s awful. This the wrong thing to automate. You can do this manually, however it doesn’t stop you getting into hell, rather just slow you down, as you can put yourself into hell (in fact everyone puts themselves into hell voluntarily). The point is it makes you think how you get there, so if you have to download manually, you will start thinking “maybe I don’t want this” or “maybe I can do this instead”. And when you need to update packages, being manual forces you to be very careful." I sympathise with this, but I have to respond that we have to live within existing ecosystems. Getting rid of npm and doing things manually won't make building SPAs have fewer dependencies, build would be incredibly slow and painful. | ||||||||||||||||||||||||||||||||||||||
▲ | bluGill 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
Packages themselves are not bad. NPM is just fine - so long as you don't let it do dependency resolution and lock the version of every package. Note that this means you have to get notified when each package is updated (how!) and make a decision on how to update it (or if you decide not to update make a decision to maintain it). The other thing is your package manager cannot go out to the internet randomly. You need it to download from a place you are comfortable with (which might or might not be the default) existing as long as you need packages, and that will keep the versions of packages you want around. If you are a company project that means an internal server/mirror because otherwise something you depend on will disappear in the future. (most of they decide nobody is using it, delete it, but sometimes it is discovered the thing is an illegal copyright violation - but you have ask your lawyers what this means for you - perhaps a license is easy to get) | ||||||||||||||||||||||||||||||||||||||
▲ | gingerBill 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
> Getting rid of npm and doing things manually won't make building SPAs have fewer dependencies, build would be incredibly slow and painful. Honestly, I don't think this is true in the slightest. Rather, I hypothesize that people want to use such tooling and think the alternatives are slower, which I don't think is true. If people actually did use fewer dependencies, people would have actually have websites that didn't take ages to load and were responsive. So the existing ecosystems are just bad. | ||||||||||||||||||||||||||||||||||||||
▲ | microtherion 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Some years ago, I had to reproduce a neural model build that had only been done previously by a single colleague on her laptop, not using a package manager. Part of my reproducing the build was to conduct all the library downloading in a miniconda environment, so at the end I had a reproducible recipe. Is the original author seriously claiming that anybody was better off with the original, "pure" ad-hoc approach? | ||||||||||||||||||||||||||||||||||||||
▲ | Sesse__ 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
> Getting rid of npm and doing things manually won't make building SPAs have fewer dependencies, build would be incredibly slow and painful. You don't think making adding dependencies incredibly slow and painful would make people have fewer of them? | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
▲ | pmarreck 4 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
There already is a (partial) solution to dependency hell: Nix. It will at least massively help prevent things from breaking unexpectedly. It won't prevent you from having to cascade a necessary upgrade (such as a security fix) across the entire project until resolution/new equilibrium is achieved. My solution to the latter is simply to try to depend on as few things as possible. But eventually, the cancer will overtake the project if it keeps growing. Source: Have worked on a million-LOC Ruby app | ||||||||||||||||||||||||||||||||||||||
|