4 ms·
Yarn folks try hard (it seems) to get rid of local node_modules and link directly to user-wide multi-version repos, but met the resistance from tool maintainers
by wruza 7y ago
Yarn folks try hard (it seems) to get rid of local node_modules and link directly to user-wide multi-version repos, but met the resistance from tool maintainers who just walk that dir directly. I can’t remember specific details now, but yarn pnp didn’t work for me, because of browserify and co apparently.
As of the cache size, I simply do not care. E.g. installing gnome, kde or openoffice requires to download hundreds of megabytes of binaries and everyone is okay with that. If you’re not familiar with these packages, they draw large ui controls, copy files and render bad tables. Not much different from a regular node project.
- no_wizard 7y agoBig difference though, I'd say, is software from those respective foundations are generally better tested, better documented, and less likely to have security holes than the average npm installed module. I don't think they ever got "left-padded" as they say. Not that your overall point is wrong (most definitely, it is not in my opinion). I think the reality is that this is what actually drives the concern of the size of the node_modules folder, because deep down, all frontend developers know that so many of these packages have never been vetted, probably won't be vetted, and there is alot of duplicate functionality in many of these dependencies, or the libs themselves just aren't designed to be efficiently consumed. Other communities (like Python) have been having community level conversations around the size of their respective package folders & the validity of reproducing their builds, security etc for awhile now, and the governing bodies for those respective communities (and/or language) are working hard to reduce redundancy among packages & encourage cooperation (the PSF, for instance, has funded directly or helped facilitate funding for many keystone packages, like flask, IIRC. It is also my understanding that Microsoft has been doing (and is expanding its efforts to) do this via the https://dotnetfoundation.org/ https://dotnetfoundation.org/ among other efforts) Sadly, I have not seen the same effort within the NPM/frontend focused ecosystem. Though, maybe the open JS foundation will take off: https://openjsf.org/projects/ https://openjsf.org/projects/
- TeMPOraL 7y ago> E.g. installing gnome, kde or openoffice requires to download hundreds of megabytes of binaries and everyone is okay with that Come on. Gnome and KDE are not equivalent of a node project, they're an equivalent of a browser (or at least browser chrome). And OpenOffice does quite a lot more than pretty much any Node project out there.
- wruza 7y agoThat depends on where you draw the line. If gnome is not gtk/glib, and if kde is not qt, then it is apples to an orange. If they are, then your comparison is correct. I mean, making chrome is not a big issue if you’ve got yourself webkit/blink/presto/etc. it is a regular program, pretty stupid one, if you think its ui out of box.
- Vinnl 7y agonpm has been doing work in that area as well: https://npm.community/t/tink-faq-a-package-unwinder-for-javascript/3191 https://npm.community/t/tink-faq-a-package-unwinder-for-java... (That said, I think the people working on that have since been laid off or quit, so not sure what the current status is.)
- aweiland 7y agoMaven figured out how to make this work almost 20 years ago.
- wruza 7y agoIt’s not as hard to figure out how to make this work, as to negotiate it with everyone once the practice is established. Yarn pnp works, but its side-effect is empty node_modules, which breaks everything else.
- arcatek 7y agoFwiw our PnP implementation is now much better than a year ago (it was still experimental, after all!). Expect to see more in this space in the next few weeks...!