Unpopular opinion: you should copy/fork/DIY your dependencies for everything
twitter.com
twitter.com
Usually, this happens with any tutorial/blog that tells you to pip/npm install and doesn't specify an exact version or provide a pinned package.json. if it's a year old, it almost always won't work without estimating what version of X was likely published at the time of blog entry.
I forgot to pin dependencies when I was working. It would take a lot of trial and error and effort to get back to where I was. Or I have to rewrite the experiments.
Take lots of screenshots and screen casts to preserve your software!
A screenshots of multiplayer editor that allows transclusion that I can't build anymore.
https://github.com/samsquire/liveinterface?tab=readme-ov-fil...
There's tradeoffs, as there are in all things. It's not always the best idea; but neither is "lets just dynload it off a URL at runtime" neither.
The big places do this. The startups don’t because it’s not a large enough risk.
Vendor everything. It's better for everyone except your code host, which is easily changed if necessary.
Vendoring (generally) means it's already on disk and needs no config or separate processes to take advantage of. It's nearly foolproof.
To go into more detail: for a custom built web app I might use nextjs, react, express, passport, prisma, and even some others. Sounds like I'm using a lot of dependencies right? I kind of regret using prisma, and maybe I can avoid using react / nextjs in the future. But I will handroll minor data manipulation needs, or requirements for 'fake' data, tests, etc. My experience at work is that the exact same app at a big company would be slower, and would have about four times as many dependencies, a complicated monorepo, and more. And trying to stop it is utterly futile.
At the very least, I think it's generally a good idea to pin all dependencies to the exact version.
(Cards on the table: I've occasionally vendored stuff for a variety of reasons - because we needed to apply a patch that upstream didn't want or didn't accept quickly enough, or because we were stuck on an old version and needed to backport a fix - I've also on occasion copy-pasted 50-100 lines of code for a specific bit of functionality to avoid bringing in a 5MB library. These are exceptions - in the general case I prefer to depend on upstream wherever possible.)
The build no-longer worked because many of the links to the dependencies were dead, and the original team didn't cache the dependencies and put them someplace safe. I spent a couple weeks just tracking down packages, from probably not great sources, to get everything up and running again.
My habit of minimizing external dependencies has let me avoid numerous serious problems.
As you progress in experience you typically build up enough skills to DIY deps when you need to, encounter situations in which you can get burned with not vendoring, and have your eyes opened to the rather middling quality of a lot of dependencies.
I get how there is risk associated with a supply chain attack, but what are you going to do when you don't understand a vulnerability and need to fix it?
Most problems aren't impossible to solve of course, but those who've been working with a codebase for a long time probably have a more intimate knowledge of how it works.
Its also acts to speed up testing and deployment
In other cases, I've taken inspiration from other libraries and implemented that functionality from scratch. The library's entire filters system was inspired by the way SVG allows users to build filters from building blocks. For the color system I should have reached for a well-maintained library (such as color.js) but instead chose to implement my own system using the CSS Color Module 4 spec as my guide. I've probably learned too much about color gamuts but if a question about the difference between D50 and D65 white points ever comes up in a pub quiz, I'll have the answer!
Is that publicly available anywhere?
For example, Java’s maven is stellar (grade too if you use Maven’s)