Re:Uv's killer feature is pulling in local dependencies
by cdaringe on Sunday January 12, 2025 @05:22PM
(#42677553)
The pain is real. Most of the issues are navigable, but often take careful thought versus some canned recipe. npm or yarn in large projects can be a nightmare. starting with pnpm makes it a dream. Sometimes migrating to pnpm can be rough, because projects that work may rely on incorrect, transitive, undeclared deps actually resolving. Anyway, starting from pnpm generally resolves this sort of chaos.
Most packing managers are developed.
Pnpm is engineered.
It’s one of the few projects I donate to on GitHub
Re:Uv's killer feature is pulling in local dependencies
by wiseowise on Sunday January 12, 2025 @06:13PM
(#42678002)
What kind of amateurs are you working with? I’m not a Node.js dev and even I know about npm ci command.
Re:Uv's killer feature is pulling in local dependencies
by mirekrusin on Sunday January 12, 2025 @06:24PM
(#42678106)
Sounds like a tale from a decade ago, people now use things like pnpm and tsx.
Re:Uv's killer feature is pulling in local dependencies
by wruza on Sunday January 12, 2025 @09:01PM
(#42679241)
So you’re not experiencing exactly this with pip/etc? I hit this “just rebuild this 10GB venv” scenario like twice a day while learning ML. Maybe it’s just ML, but then regular node projects don’t have complex build-step / version-clash deps either.
Re:Uv's killer feature is pulling in local dependencies
by zo1 on Monday January 13, 2025 @01:47AM
(#42680735)
I think it's something unique to python's ML ecosystem, to be honest. There is a lot of up-in-the-air about how to handle models, binaries and all of that in a contained package, and that results in quite a few hand-rolled solutions, some of which encroach on the package manager's territory, plus of course drivers and windows.
I've worked on/with some fairly large/complex python projects, and they almost never have any packaging issues that aren't just obvious errors by users. Yes, every once in a while we have to be explicit about a dependency because some dependent project isn't very strict with their versioning policy and their API layers.
Re:Uv's killer feature is pulling in local dependencies
by wink on Monday January 13, 2025 @04:39AM
(#42681694)
I've not used python professionally for years - but I have had to do this maybe once in many years of usage. Seen it like once more in my team(s). A rounding error.
I've seen someone having to do this in node like once every month, no matter which year, no matter which project or company.
Run npm install
Delete node_modules and wait 30minutes because it takes forever to delete 500MB worth of 2 million files.
Do an npm install again (or yarn install or that third one that popped up recently?)
Uninstall/Upgrade npm (or is it Node? No wait, npx I think. Oh well, used to be node + npm, now it's something different.)
Then do steps 1 to 3 again, just in case.
Hmm, maybe it's the lockfile? Delete it, one of the juniors pushed their version to the repo without compiling maybe. (Someone forgot to add it to the gitignore file?)
Okay, do steps 1 to 3 again, that might have fixed it.
If you've gotten here, you are royally screwed and should try the next javascript expert, he might have seen your error before.
So no, I'm a bit snarky here, but the JS ecosystem is a clustermess of chaos and should rather fix it's own stuff first. I have none of the above issues with python, a proper IDE and out of the box pip.