gary / dependency_management_talk

Discussing the options for managing dependencies in your Rails/Merb projects, with examples for each.

This URL has Read+Write access

dependency_management_talk / notes.markdown
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 1 # git's builtin facilities #
708ef06d » gary 2008-11-15 subtree merge strategy notes 2 ## subtree merge strategy ##
3 * setup involves a number of different commands/options: annoying
4 * cloning a repo with subtrees requires re-registration of remote branches
5 * no opting out of registered dependencies--one nicety of submodules
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 6 * dependencies must be embedded in superproject: bloat fail
7 * praised for 'less, long-term administrative burden': given the simplicity of the end result, i believe it.
708ef06d » gary 2008-11-15 subtree merge strategy notes 8 * compatible with all versions of git (submodules were introduced in 1.5.3)
9 * not well-advertised... why didn't i know about this feature before?
c03d36bc » gary 2008-11-15 the dealbreaker 10
fb2db841 » gary 2008-11-15 submodules notes from my ex... 11 ## submodules ##
0944948c » gary 2008-11-15 fixed workflow inaccuracy, ... 12 * initizialize submodule facility, {add,update}, notice extra step
fb2db841 » gary 2008-11-15 submodules notes from my ex... 13 * dependencies pulled in at a specific commit (vs. a branch head), detached from tree: very annoying
14 * updating a project's submodules auto cleans the current branch: annoying
0944948c » gary 2008-11-15 fixed workflow inaccuracy, ... 15 * removing registered submodules is a real pain in the ass, and can have mixed results
c03d36bc » gary 2008-11-15 the dealbreaker 16 * changes to the submodule *must* be published before changes to the project that references it. if you forget, the repo will no longer be cloneable... fail.
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 17 * chaos can also ensue with normal workflows: http://rubyurl.com/Umhn
d894becd » gary 2008-11-15 capistrano gets a mention 18 * dependencies can be individually imported into a {cloned,forked} project after registration
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 19 * capistrano comes with builtin, hassle-free support, but at the cost of having your deployment rely on (more) external servers
d4edad67 » gary 2008-11-15 notes for Tim Dysinger's su... 20
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 21 # git wrappers #
9dc3c884 » gary 2008-11-15 sake, not rake 22 ## Tim Dysinger's subtree merge sake tasks ##
d4edad67 » gary 2008-11-15 notes for Tim Dysinger's su... 23 * pastie didn't work for me, so i created a new one [here](http://pastie.org/315840.txt)
24 * simple to use, simple to setup
25 * outdated and in need of updating for git 1.6.x
26
8a03f742 » gary 2008-11-15 initial impressions for git... 27 ## Pat Maddox's giternal ##
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 28 * dependencies configured via repo url/path entries in `config/giternal.yml`
8a03f742 » gary 2008-11-15 initial impressions for git... 29 * did not work as advertised (giternal update) out of the box--err, installing from rubygems
30 * hand installing the master did, however
c0cdc5e8 » gary 2008-11-15 more notes following some p... 31 * a great fit for dependencies that you have commit access to
32 * push/pull changes, freeze for deploy, unfreeze for updates
33 * can also be used for the simpler, track-and-update use case as well
34 * read [this thread](http://rubyurl.com/Umhn) for clarification of use cases, differences from braid
457d49bf » gary 2008-11-15 giternal notes from under t... 35 * uses repository cloning and pulling in conjunction with ignore entries
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 36 * lacks the ability to import a dep at a stable version (master branch only)
457d49bf » gary 2008-11-15 giternal notes from under t... 37 * deploying with a known-stable version of a dependency is manual, but not a non-issue: manually change to desired branch, freeze, deploy
9b8a59d6 » gary 2008-11-15 braid initial impression 38
c1955f37 » gary 2008-11-18 updates to braid's feature ... 39 ## François Beausoleil's piston ##
40 * made maintaining forked subversion deps a cinch before git took over... at the cost of speed
41 * scm-agnostic rewrite **still** in the works... been a while (project initially debuted in 2006)
42 * still very rough around the edges: status call blows up
43 * minor gripe: some command names remain stuck in the past. e.g., {un,}locking vs. {un,}freezing
44 * most of documentation is still geared for the 1.4.x (svn) generation: fail
45
9b8a59d6 » gary 2008-11-15 braid initial impression 46 ## Cristi Balan's braid ##
c1955f37 » gary 2008-11-18 updates to braid's feature ... 47 * feature set similar to piston, but works exclusively with git
b42f4c84 » gary 2008-11-16 c is for cedilla 48 * direct competition to François Beausoleil's piston (remember that one?)
c1955f37 » gary 2008-11-18 updates to braid's feature ... 49 * can manage both git- and svn-based dependencies
9b8a59d6 » gary 2008-11-15 braid initial impression 50 * allows for complete control (add, update, delete) of dependencies, with more features planned for 0.6
dd4dff81 » gary 2008-11-16 confusion fail 51 * appears to be a wrapper for git's subtree merge strategy: yes
c1955f37 » gary 2008-11-18 updates to braid's feature ... 52 * embeds dependencies in project: possible fail for larger projects (used in conjunction with FastRemoteCache, however...)
089680aa » gary 2008-11-16 another braid nicety i miss... 53 * maintains its own, clearly named remote branches for the dependencies it manages
9b8a59d6 » gary 2008-11-15 braid initial impression 54 * straightforward and intuitive to use
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 55 * handy rails plugin shorthand: `braid add <repo_url> -p`
c1955f37 » gary 2008-11-18 updates to braid's feature ... 56 * on update, halts on most operations if branches are dirty: awesome
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 57 * deletion of deps doesn't clean up their remote branches, yet
55c42a34 » gary 2008-11-15 a few more braid notables 58 * no support for sending changes upstream to dependencies, a la giternal
c1955f37 » gary 2008-11-18 updates to braid's feature ... 59 * dependency status planned but not been implemented yet
60 * can select mirrors that also import their whole history in the parent project (handy in the case of a shared models setup)
0b9b8716 » gary 2008-11-15 piston still gets a mention 61
b079b4aa » gary 2008-11-15 ext, yet another attempt fo... 62 ## Miles Georgi's externals ##
63 * yet another scm-agnostic approach like piston and braid
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 64 * royal pain: `--help` all but requires piping to a pager
a0fd9d99 » gary 2008-11-16 ext pain in the ass duly noted 65 * {checkout,export,status,update} and {co,ex,st,up} have *different* behavior: confusing and unintuitive. what happened to shorthand?
b079b4aa » gary 2008-11-15 ext, yet another attempt fo... 66 * takes agnostic to the project-level, although other project types haven't been implemented yet
67 * installation shorthand driven by project type (e.g., ext install <url> would install into vendor/plugins for a rails project)
68 * shows status for all dependencies or a specific one if specified
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 69 * deletion doesn't clean out `.gitignore` or `.externals` yet
b079b4aa » gary 2008-11-15 ext, yet another attempt fo... 70 * built with deployment in mind: export functionality
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 71 * clever, unusual options such as a `touch_emptydirs` (for forcing git to track an empty dir)
b079b4aa » gary 2008-11-15 ext, yet another attempt fo... 72 * hasn't seen any activity for a while
43db499c » gary 2008-11-15 server-side options, starti... 73
4880989b » gary 2008-11-15 a completely different (and... 74 # symlinking #
75 ## 37Signals' Cached Externals ##
76 * operates under the assumption that your dependencies won't change often... so why copy them with each deployment?
77 * trivial to install: `script/plugin install git://github.com/37signals/cached_externals.git`
78 * after that, dependencies are configured in `config/externals.yml`
79 * path, repository URL and revision are required (shorthand for revisions is supported, but can slow down the process)
80 * setup via capistrano, established locally via `cap local externals:setup`
81 * updating is trivial: updated the desired revision and execute the setup recipe again
82 * ignore rules must be set manually
1e6c7c60 » gary 2008-11-16 surprising discovery with g... 83 * script/generate has issues with symlinks? did not detect generators from symlinked plugins
4880989b » gary 2008-11-15 a completely different (and... 84
43db499c » gary 2008-11-15 server-side options, starti... 85 # server-side (the other half) #
387191ad » gary 2008-11-16 correction on deployment wi... 86 ## deploying ##
c3ac6cff » gary 2008-11-16 touching up last nite's clu... 87 * all of the approaches support (minus cached externals) some form of {copy,export}ing their managed dependencies:
43db499c » gary 2008-11-15 server-side options, starti... 88 * git submodules: pulled from various remote repositories (`set :git_enable_submodules, 1` in capistrano; initialization, update `:web_command` in vlad)
387191ad » gary 2008-11-16 correction on deployment wi... 89 * git subtree merge strategy and braid embed dependencies in project, and require no extra steps
4175e3b5 » gary 2008-11-16 corrections for braid 90 * giternal and piston: freeze dependencies, call to `update` in deployment script
2431bf5c » gary 2008-11-15 deployment with the managem... 91 * ext: `ext --workdir=#{current_release} ex`
6014a71c » gary 2008-11-15 a brief mention for 37signa... 92
93 ## 37 Signals' Fast Remote Cache ##
94 * custom Capistrano deployment option that hard links the project's assets instead of copying them
95 * intended for larger projects where copy time noticeably slows deployment
96 * not a standalone solution: use in conjunction with any of the above options
97
b7ba364c » gary 2008-11-16 last minute discovery of an... 98 ## Viget Labs' RSync with Remote Cache ##
99 * another alternative to the standard, `:remote_cache` deployment option in Capistrano
100 * see github page for more details
101
662f584f » gary 2008-11-15 added the git manual (ever ... 102 # resources #
103 * [How to use the subtree merge strategy](http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html)
104 * [Git User's Manual - Submodule Chapter](http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#submodules)
98913313 » gary 2008-11-15 the git community book's su... 105 * [Git Book - Submodules](http://book.git-scm.com/5_submodules.html)
006eeb91 » gary 2008-11-15 braid resources 106 * [Replacing Braid of Piston (for Git) with 40 lines of Rake](http://dysinger.net/2008/04/29/replacing-braid-or-piston-for-git-with-40-lines-of-rake/)
b4633231 » gary 2008-11-15 reshuffled, added giternal ... 107 * [giternal@github](http://github.com/pat-maddox/giternal/tree/master)
108 * [Easy Git Dependency Management wiht Giternal](http://www.rubyinside.com/giternal-easy-git-external-dependency-management-1322.html#comment-37316)
006eeb91 » gary 2008-11-15 braid resources 109 * [braid@github](http://github.com/evilchelu/braid/tree/master)
110 * [braid 0.5 announcement](http://evil.che.lu/2008/10/29/braid-0-5-vendor-your-git-and-svn-repositories)
600c7c5e » gary 2008-11-15 piston, the original vendor... 111 * [piston@github](http://github.com/francois/piston/tree/master)
f43a8ee8 » gary 2008-11-15 ext resources 112 * [ext@github](http://github.com/azimux/externals/tree/master)
113 * [externals-tutorial](http://nopugs.com/2008/09/06/ext-tutorial)
0a38d84b » gary 2008-11-15 fast remote cache github pr... 114 * [fast_remote_cache@github](http://github.com/37signals/fast_remote_cache/tree/master)
27480477 » gary 2008-11-15 cached externals resources 115 * [cached_externals@github](http://github.com/37signals/cached_externals/tree/master)
116 * [CachedExternals: managing application dependencies](http://www.37signals.com/svn/posts/1364-cachedexternals-managing-application-dependencies)
b7ba364c » gary 2008-11-16 last minute discovery of an... 117 * [capistrano_rsync_with_remote_cache@github](http://github.com/vigetlabs/capistrano_rsync_with_remote_cache/tree/master)