4 ms·
> .gitignore: node_modules Wait, did I miss something? Wasn't it google who started the "vendor everything" philosophy in the first place?
by xg15 9y ago
> .gitignore: node_modules
Wait, did I miss something? Wasn't it google who started the "vendor everything" philosophy in the first place?
- milankragujevic 9y agoAren't people supposed to just require the dependencies in package.json and not distribute the large blob of code? And you run "npm install"? Isn't that the current web dev "way" of life...?
- sidmkp96 9y agoSo? What's wrong with this? Why would someone check-in all the 3rd party code, when same can be described in package.json & downloaded again.
- reimertz 9y agoI guess some see a risk of mutability(https://medium.com/@azerbike/i-ve-just-liberated-my-modules-9045c06be67c https://medium.com/@azerbike/i-ve-just-liberated-my-modules-...). But you can always use shrink-wrap or other package managers that guarantee immutability. Oh, I guess I should say I love npm/yarn and use it as a core of all my projects. ️
- quickben 9y agoI started seeing the floating dependency approach at smaller places and personally consider it a bad pattern. You get everything you depend on, stuff it into a folder named third-party, and check it in forever (or until security bugs, features you need, etc). Include all and any licences, this is important. When dealing with any software that's supposed to be our there for decades, the last thing you want it to have unplanned work because of missing libraries.
- reimertz 9y agoI have seen this first hand at a acquisition. Missing licenses resulted in the entire FE team working in finding missing licenses/find alternative module with proper license or worst case scenario; implement our own solution. This literally took 1 week. Shrink-wrap would have saved us a bunch of $$$.
- quickben 9y agoYes, it takes one to go through that experience once, to fully appreciate the effort. I also look at that one downvote to my post, and can't help but think that somebody is up for a very nasty surprise in his career.
- Gigablah 9y agoYou have to be careful about the type of licenses as well. Happened to me, luckily it was a tiny library and there was an alternative available. See anything with a "cute" license, such as WTFPL? Don't use it for work.
- hedora 9y agoWhat's wrong with WTFPL? I needed some wtfpl code for something, and asked a team of corporate lawyers to evaluate it. They deemed acceptable, and whitelisted it at one of the biggest software companies around.
- Gigablah 9y agoAnother one of the biggest software companies around came to the opposite conclusion :(
- revmoo 9y agoA lot of folks depend on third party sources for packages. Then Guthub goes down and tgey cand deploy their site.
- scrollaway 9y agoVendoring packages doesn't mean vendoring in git. Vendoring in git is a terrible idea (which for some absurd reason the golang community has decided isn't...). It pollutes your tree, your history, your blames, your searches, makes your git repository massive, etc etc. Node would be even worse.
- the_duke 9y agoWell, Go doesn't have a package system and no good external tool to circumvent it. So the choice is either maintain a fork of every dependency or vendor them, and vendoring is considerably less painful imo. (I'm not saying it's a good solution, mind you)
- icebraining 9y agoWe vendor in git by having a master repo, inside of which you have a submodule for our app and others for the dependencies. That way we can track and keep them in sync without having the problems you described.
- scrollaway 9y agoYeah submodules are a nice way to do git-based vendoring. I don't understand why the golang community didn't go that route.