Skip to content

Updating behaviour

tmeasday edited this page Jul 11, 2012 · 2 revisions

Reference program: bundler

bundle install:

a) create a tree of dependencies (versions included) based on gem's gemspec files and stores it in Gemfile.lock

b) install the version of the package specified in Gemfile.lock if it is not already installed.

bundle update X:

a) updates package X to the latest possible version given constraints. Updates Gemfile.lock to reflect.

b) as above.

bundle update:

a) as above, but for all packages

b) as above.

Differences / Challenges

  1. Bundle uses sources, which contains gemspecs for all packages (barring those installed via git). Not sure what it does for git-ted gems exactly.

    This means it's much quicker to construct Gemfile.lock than making lots of http requests.

  2. Bundle enforces a versioning scheme in gemspec files.

    • We do not right now. This makes dependencies a bit fuzzier.
    • Also AFAIK you can't depend on a git-ted version of another gem (from a gem).

Example problem:

App depends on models version >= 0.3.0. Another package the app depends on depends on models, from git, tmeasday's fork, branch devel. Is this >= 0.3.0? (Maybe we can tell if we enforce tagging or something, IDK).

Clone this wiki locally