<story><title>Announcing the new Rust package manager, Cargo</title><url>https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html</url></story><parent_chain><item><author>steveklabnik</author><text>Could you expand on that, please?&lt;p&gt;I am very emphatically _not_ saying that you&amp;#x27;re wrong, but without enumerating what your problems are, you can&amp;#x27;t get them solved.</text></item><item><author>defen</author><text>I just hope they don&amp;#x27;t repeat all the bundler-related things that made me hate deploying rails.</text></item></parent_chain><comment><author>nirvdrum</author><text>Here&amp;#x27;s a non-comprehensive list of issues I have with bundler.  Don&amp;#x27;t get me wrong, I think in many ways it&amp;#x27;s a lot better than what we had before.  But I also don&amp;#x27;t believe it&amp;#x27;s advanced much since its initial debut and think we can do better (and yes, I&amp;#x27;ve tried on that front):&lt;p&gt;* You can&amp;#x27;t override a dependency:&lt;p&gt;This may very well be an issue with rubygems, but I&amp;#x27;d have hoped bundler adoption would have fixed it if that&amp;#x27;s the case.  Since dependencies and their versions cannot be overridden, transitive dependency conflicts are a constant minefield.  The naive solution is to modify your gemspec to be overly permissive and I get pressure to do this frequently with gems I work on.  But, now I&amp;#x27;m asserting that my gem works with some hypothetical dependency that hasn&amp;#x27;t been release yet.  And I&amp;#x27;ve watched that blow up many times.  Semantic versioning does not fix this.&lt;p&gt;* Dependencies can disappear on you:&lt;p&gt;Yanked gems irk me, but I appreciate their value in preventing the installation of an unwanted version when one isn&amp;#x27;t specified.  However, it also explicitly blocks installation of a particular version, effectively ignoring the version specification in Gemfile.  I may be romanticizing things here, but I don&amp;#x27;t recall ever seeing a non-SNAPSHOT published artifact being removed when I was working with maven or ivy.&lt;p&gt;What&amp;#x27;s frustrating is the gem still exists, but not in the index.  I guess I would expect Bundler to realize I do want to install the version I&amp;#x27;ve specified and fetch the file and do the installation.  Ultimate control in my dependency graph should rest with me, not the whim of an upstream developer.  I realize this is a rubygems.org thing, but it also strikes me as a solvable problem that many don&amp;#x27;t see as a problem.  And it means that checking out historical copies of my app almost certainly will not run without changing the Gemfile(.lock), which seems like a core value in a dependency management tool.&lt;p&gt;In any event, you will only discover this when deploying to a machine that has come up since the gem was yanked.  Common staging server and CI strategies don&amp;#x27;t catch this since it&amp;#x27;s essentially a race condition in the gem ecosystem.  You simply won&amp;#x27;t find out until your deploy fails.  It undermines any trust in the ecosystem and the only viable solutions are: 1) run your own gem server; 2) modify gemcutter to dismiss all yanks, or 3) vendor every gem your app uses.&lt;p&gt;* It has weird rules:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  gem &amp;#x27;x&amp;#x27;, platform: :mri
  gem &amp;#x27;y&amp;#x27;, platform: :jruby
&lt;/code&gt;&lt;/pre&gt;
works the way you&amp;#x27;d expect, but&lt;p&gt;&lt;pre&gt;&lt;code&gt;  gem &amp;#x27;z&amp;#x27;, git: &amp;#x27;whatever&amp;#x27;, branch: &amp;#x27;mri_compat&amp;#x27;
  gem &amp;#x27;z&amp;#x27;, git: &amp;#x27;whatever&amp;#x27;, branch: &amp;#x27;jruby_compat&amp;#x27;
&lt;/code&gt;&lt;/pre&gt;
will not.  Apparently the dependency graph can&amp;#x27;t be resolved if the gem names aren&amp;#x27;t unique.  The platform part isn&amp;#x27;t taken into consideration from what I gather.  This made it really hard when I was trying to port some C ext. gems to a JRuby equivalent.&lt;p&gt;* It promotes bad practices:&lt;p&gt;This one is admittedly contentious, but given bundler was created basically for Rails 3 and Rails is the worst abuser, it&amp;#x27;s also hard to divorce the two.  But requiring your entire dependency graph up front is just not a good idea.  It&amp;#x27;s bad for performance and it&amp;#x27;s bad for memory.  It&amp;#x27;s why apps take 30s to boot.  Most non-trivial Rails apps I&amp;#x27;ve come across are basically multi-tiered applications in a monolithic codebase.  That means fog is getting loaded in controllers and haml is getting loaded in Sidekiq jobs.  It&amp;#x27;s just a very odd situation.  I&amp;#x27;ve tried to defer loading, but this is a battle that&amp;#x27;s hardly worth fighting because of railties.  Auditing every gem to see if it has a railtie is tiresome and invalidated as soon as a new version comes out.  If a gem has a railtie, it needs to be required at a very specific point in the Rails boot cycle, otherwise your app just won&amp;#x27;t work the same.  Figuring out that difference will likely drive you insane.&lt;p&gt;Likewise, every new gem created from Bundler has a gemspec that shells out to git at least once.  So, if you have a dependency on a gem sourced from git in your Gemfile, you get to pay that cost on every app load.  And if you end up somehow getting different results on different machines, then you&amp;#x27;re not really running the same thing, which seems odd to me for a dependency management tool.&lt;p&gt;* It&amp;#x27;s slow:&lt;p&gt;Gem installation has gotten a lot faster since the early days.  And dependency resolution has gotten better as well.  So, I&amp;#x27;m not saying no work is being done here, but it is still slow.  This is a complaint that is always levied at maven, too, so Bundler certainly isn&amp;#x27;t unique in this regard and I&amp;#x27;d argue it got faster in a much shorter timeframe than maven did, so that&amp;#x27;s promising.&lt;p&gt;* It was designed for MRI:&lt;p&gt;This one may be unfair since I don&amp;#x27;t use rbx, but bundler wasn&amp;#x27;t really built with JRuby in mind.  &amp;quot;bundle exec&amp;quot; is used everywhere now and it forks a process.  Forking the JVM is anything but light.  The solution is to use binstubs, which avoid the forking.  But also means you can&amp;#x27;t really use both JRuby and MRI in the same codebase.&lt;p&gt;I really hope that Cargo learns from some of the pitfalls of Bundler.  It seemed like Bundler didn&amp;#x27;t really learn from the pitfalls of other package managers.  I wasn&amp;#x27;t involved with any of the design decisions, so I certainly don&amp;#x27;t want to say it was pulled together haphazardly.  But it also seemed to overlook problems that tools like maven had solved over the past decade.  I&amp;#x27;m sure a fair bit of that had to do with the underlying rubygems system, but the distinction is also a bit moot from the user perspective.</text></comment>
<story><title>Announcing the new Rust package manager, Cargo</title><url>https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html</url></story><parent_chain><item><author>steveklabnik</author><text>Could you expand on that, please?&lt;p&gt;I am very emphatically _not_ saying that you&amp;#x27;re wrong, but without enumerating what your problems are, you can&amp;#x27;t get them solved.</text></item><item><author>defen</author><text>I just hope they don&amp;#x27;t repeat all the bundler-related things that made me hate deploying rails.</text></item></parent_chain><comment><author>defen</author><text>It&amp;#x27;s been a while (almost 2 years) and I don&amp;#x27;t use ruby much any more, so my memory is a little hazy and for all I know the issues have been fixed.  My main complaints were that too much magic made it difficult to tell what was being loaded from where; and that it was a ton of work to get proper automated deployments set up (with puppet...in a way that didn&amp;#x27;t make assumptions about the target machine - RVM was also a huge culprit here).  Also, at times it was painfully slow.  To be fair I&amp;#x27;m not super familiar with the internals - it&amp;#x27;s totally possible that it&amp;#x27;s all ruby&amp;#x27;s fault and any ruby package manager would have the same issues.  For every day development bundler was mostly great - it was just painful to get proper deployments working.&lt;p&gt;I much prefer how npm handles things.</text></comment>