Live data from Hacker News

Yarn – A new package manager for JavaScript

code.facebook.com

461–470 of 486 posts

Re: Yarn – A new package manager for JavaScript

#461

Earlier quoted context omitted.

Explain why duplication is mandatory?

Just imagine two packages you depend on (a and b) that both have a shared dependency (x). Both start off depending on x version 1.0 but then later a is updated to 2.0 while b isn't. Now you have two packages depending on different versions of the same package and hence the need for duplication. You have a that needs x@2.0 and b that needs x@1.0, so both copies are kept.

Would it be possible to create hardlinks or symlinks to a particular package/version pair shared as a dependency between other packages? I know this only works on unix-like OSes but otherwise it could revert to the old behaviour of duplicating the dependency.

Re: Yarn – A new package manager for JavaScript

#462
post #322
post #241

Earlier quoted context omitted.

Is npm the bazooka or C++? As someone who's worked with C/C++ (and its hilarious explosion of tooling -- half-a-dozen at Google alone), maven, bundler and Cargo, I think it's just not accurate to say that the npm ecosystem has a particularly high level of complexity.

npm is the bazooka. Covers a lot more area with a single tool, but sometimes dangerous if you use it wrong. C/C++ tooling is a plastic butterknife you get with airplane food.

Some languages actually have standard libraries so don't need bazookas..

Re: Yarn – A new package manager for JavaScript

#464

So how do you install packages like `npm install` without adding it to the package.json file?

You don't. If you want to be able to do stuff like that (and inevitably run into "hmm, works on my machine"-type bugs once you start sharing your code with others), you need to keep using npm.

This kind of liberty is the sort of stuff npm was designed for. It is also why npm has been causing trouble in many cases.

Re: Yarn – A new package manager for JavaScript

#465

So how do you install packages like `npm install` without adding it to the package.json file?

You don't. If you want to be able to do stuff like that (and inevitably run into "hmm, works on my machine"-type bugs once you start sharing your code with others), you need to keep using npm. This kind of liberty is the sort of stuff npm was designed for. It is also why npm has been causing trouble in many cases.

I was under the impression that this was about speed.

There are many use cases for this functionality, the design of a software package shouldn't instill dogma into its users. Users use software for their needs, not to sign up to a religion.

Re: Yarn – A new package manager for JavaScript

#467

Earlier quoted context omitted.

And thus could have been implemented as part of the existing client.

" Could have been implemented as part of the existing client" isn't the same as " Should have been implemented as part of the existing client". I personally don't know much about either tool (don't do a ton of JS), but it's possible that fixing the existing client without either breaking backward compatibility or making it too complicated (multiple modes of operation) was too difficult or not worth it. Also, I'm havi…

Yeah - the npm client codebase would not be fun to do a big refactor on. And you would need to do a big refactor to make the v3 flat install process deterministic and/or performant.

These issues have been raised a few times, along with the shrinkwrap/reproducability stuff, and it didnt seem like it was a big priority for the core team. Understandably I guess they seem more focussed on the enterprise/private repo side of things and just keeping things running on the client side.

Re: Yarn – A new package manager for JavaScript

#468
post #322
post #241

Earlier quoted context omitted.

Is npm the bazooka or C++? As someone who's worked with C/C++ (and its hilarious explosion of tooling -- half-a-dozen at Google alone), maven, bundler and Cargo, I think it's just not accurate to say that the npm ecosystem has a particularly high level of complexity.

npm is the bazooka. Covers a lot more area with a single tool, but sometimes dangerous if you use it wrong. C/C++ tooling is a plastic butterknife you get with airplane food.

What're you smoking? Can I have some?
Post reply on HN