TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Comparison of Programming Language Package Managers

93 pointsby mustpaxalmost 9 years ago

14 comments

knucklesandwichalmost 9 years ago
One of the things that I&#x27;ve found to be important for (and generally under-documented by) package managers is resolution strategy.<p>pip, for instance, eagerly resolves the highest version of a dependency first found in the tree and doesn&#x27;t backtrack AFAIK [1]. Cargo sounds as though it behaves similarly, but will actually backtrack [2]. I&#x27;ve also seen package managers like 0install that will use SAT solvers to solve dependency constraints [3].<p>I&#x27;ve found lack of backtracking on conflicts to be frustrating, but I&#x27;m curious how the other two (and other conflict resolving strategies) compare in practice.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;pypa&#x2F;pip&#x2F;issues&#x2F;988" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pypa&#x2F;pip&#x2F;issues&#x2F;988</a><p>[2]: <a href="http:&#x2F;&#x2F;doc.crates.io&#x2F;cargo&#x2F;core&#x2F;resolver&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;doc.crates.io&#x2F;cargo&#x2F;core&#x2F;resolver&#x2F;index.html</a><p>[3]: <a href="http:&#x2F;&#x2F;0install.net&#x2F;solver.html" rel="nofollow">http:&#x2F;&#x2F;0install.net&#x2F;solver.html</a>
评论 #12188628 未加载
评论 #12190950 未加载
评论 #12188763 未加载
评论 #12191288 未加载
halostatuealmost 9 years ago
At least three things wrong with respect to Bundler&#x2F;RubyGems:<p>1. RubyGems is the package manager. Bundler is a meta-layer on top of that which does full dependency resolution to find the right version before installing. Bundler builds on the capabilities provided by RubyGems (and will be integrated into RubyGems in the future).<p>2. Bundler does support vendoring. It is widely discouraged, but I take advantage of it in my app packager for deploys at work (Cartage: <a href="https:&#x2F;&#x2F;github.com&#x2F;KineticCafe&#x2F;cartage" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;KineticCafe&#x2F;cartage</a>, specifically cartage-bundler <a href="https:&#x2F;&#x2F;github.com&#x2F;KineticCafe&#x2F;cartage-bundler" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;KineticCafe&#x2F;cartage-bundler</a>).<p>3. RubyGems and Bundler can use alternative sources (my work applications use both public and private sources simultaneously).<p>One thing I don’t see that would love to see tracked and solved is authenticity verification. RubyGems has support for signed gems but it’s not widely used and hasn’t really been validated as Correct.<p>They should probably also look at CocoaPods and Carthage (iOS and macOS build dependencies) and whatever Swift provides.
评论 #12190455 未加载
ryandrakealmost 9 years ago
Call me old fashioned, but I find it annoying that every new language nowadays seems to want to pull in its own package manager, redundantly parallel to the perfectly good one my operating system provides. I am already perfectly fine with installing my software through apt-get. Why oh why do I need pip, and gem, and npm, and CocoaPods, and cargo, and NuGet, and on and on and on...<p>Using a new language is no longer a matter of cracking open a book, installing a compiler, and firing up vim. You&#x27;ve got to change your whole lifestyle now.
评论 #12189602 未加载
评论 #12189869 未加载
评论 #12189744 未加载
评论 #12189866 未加载
评论 #12191582 未加载
评论 #12190469 未加载
评论 #12189907 未加载
评论 #12190476 未加载
munificentalmost 9 years ago
I know Dart isn&#x27;t super widely used, but it&#x27;s package manager, pub, is probably a good reference for this. We put a ton of work into it, and Dart users regularly single it out as one of the compelling parts of the Dart platform.<p><a href="https:&#x2F;&#x2F;www.dartlang.org&#x2F;tools&#x2F;pub" rel="nofollow">https:&#x2F;&#x2F;www.dartlang.org&#x2F;tools&#x2F;pub</a><p>It hews pretty closely to Bundler&#x27;s model (versions, version ranges, lockfiles, shared dependencies), though. So I don&#x27;t know if it gives you much insight beyond &quot;Yes, another language team things Bundler is on the right track.&quot;<p>Personally, I have a hypothesis that states that all programming languages either have a package manager that works like Bundler or will end up getting one.
评论 #12191598 未加载
sivoaisalmost 9 years ago
Perl&#x27;s CPAN has tooling for diffing versions through the use of MetaCPAN (a top-notch site which every language should try to emulate). For example, here is a diff of the URI distribution:<p><a href="https:&#x2F;&#x2F;metacpan.org&#x2F;diff&#x2F;file?target=ETHER%2FURI-1.71%2F&amp;source=ETHER%2FURI-1.69%2F" rel="nofollow">https:&#x2F;&#x2F;metacpan.org&#x2F;diff&#x2F;file?target=ETHER%2FURI-1.71%2F&amp;so...</a><p>This information is also available through an API for integration into command line tools.
评论 #12191304 未加载
jbbarthalmost 9 years ago
I don&#x27;t get why &quot;pip&quot; is checked in &quot;Has separate manifest and lock files&quot;. Actually it doesn&#x27;t have that feature (which Bundler for Ruby has, for instance). This very feature comes with a third-party package called &quot;pip-tools&quot;, or possible alternatives, but raw pip doesn&#x27;t have this ability directly afaik.<p>Fwiw pip isn&#x27;t even able to enforce versions correctly (packages are installed as the file is read, and can conflict with previously expressed constraints). Or report installed versions correctly (it&#x27;s possible that packages are half-installed or installed but not reported as such by pip commands).
评论 #12191388 未加载
steveklabnikalmost 9 years ago
One thing about Cargo&#x27;s lack of &#x27;vendoring&#x27; on the checkmark list; there is <a href="https:&#x2F;&#x2F;github.com&#x2F;alexcrichton&#x2F;cargo-vendor" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alexcrichton&#x2F;cargo-vendor</a> , and soon there will be <a href="https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;cargo&#x2F;pull&#x2F;2857" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;cargo&#x2F;pull&#x2F;2857</a>
评论 #12190489 未加载
anonymousguyalmost 9 years ago
Since I had starting looking for an alternative to NPM I have discovered a couple of things:<p>* All current package managers are either language or OS specific. What if you have an application with code written in multiple languages?<p>* NPM didn&#x27;t have any kind of integrity checks for its packages, and I assume most package managers don&#x27;t either. If you download a corrupt package, for example, you won&#x27;t have any idea and it will still install.<p>* Some package managers do better than others with regards to managing packages. I found NPM encourages dependency hell and very little management tools for dependent or installed packages.<p>* A lot of package managers seem to intermix packaging, distribution, and a registry. The registries tend to have limited names to pick from (like real estate) and can result in legal problems. Also if registration to the service catalog is required you cannot self-host or self-manage the distribution of your application.<p>I am trying to work on a solution to these problems at <a href="https:&#x2F;&#x2F;github.com&#x2F;prettydiff&#x2F;biddle" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;prettydiff&#x2F;biddle</a>
评论 #12189320 未加载
评论 #12189469 未加载
ericlathropalmost 9 years ago
I&#x27;d like to see how one of the oldest package managers, Perl&#x27;s CPAN, stacks up.
评论 #12190341 未加载
评论 #12190342 未加载
nilknalmost 9 years ago
This should probably use Stack for Haskell as well, which was designed to solve various common issues that arise when using cabal as a package manager.
评论 #12190651 未加载
throwaway2016aalmost 9 years ago
I&#x27;m confused as to why composer (PHP) got an X for &quot;Central package repository&quot;... isn&#x27;t Packagist a central registry? And other package managers allow packages from source.<p>I&#x27;m not arguing the point just trying to understand the decision.
评论 #12189287 未加载
stewbrewalmost 9 years ago
Which one allows to import multiple versions of a lib&#x2F;module&#x2F;package with different versions? (Not primarily but also an issue of the package manager.)
评论 #12189049 未加载
w4tsonalmost 9 years ago
Surely if a package manger provides the ability to store in VCS then it&#x27;s admitting defeat for reproducible builds. I&#x27;m thinking npm here
the_mitsuhikoalmost 9 years ago
Cargo supports vendoring and enforces semver. Not sure why that document disagrees.
评论 #12188522 未加载
评论 #12191603 未加载
评论 #12191317 未加载