Great information, David.<br><br>Sounds like a useful blog post!<br><br><div class="gmail_quote">On Thu, Apr 17, 2008 at 7:49 AM, David Chelimsky &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Apr 17, 2008, at 7:11 AM, David Chelimsky wrote:<br>
<br>
&gt; On Apr 17, 2008, at 5:20 AM, Jonathan Leighton<br>
&gt; &lt;<a href="mailto:j@jonathanleighton.com">j@jonathanleighton.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hi David,<br>
&gt;&gt;<br>
&gt;&gt; Is there any chance you could elaborate on the problems please, so<br>
&gt;&gt; that<br>
&gt;&gt; other projects can make an informed decision whether to use<br>
&gt;&gt; submodules<br>
&gt;&gt; or not?<br>
&gt;<br>
&gt; There is always a chance :)<br>
<br>
</div>What I learned was that submodules are great for things like consuming<br>
plugins in your rails projects, but not so great for a development<br>
effort in multiple people are pushing and pulling to multiple<br>
repositories with dependencies and no multi-project transaction support.<br>
<br>
The parent repository depends on specific versions of the subs. As<br>
you&#39;re making changes in your local repos, the last thing you do is<br>
commit the parent with the references to the new versions of the subs.<br>
Every time you make a change to any of the subs you have to commit a<br>
change to the parent. These changes are useful as documentation if<br>
you&#39;re updating a plugin to the latest release. Not that useful if the<br>
log is polluted with these for every commit to every submodule.<br>
<br>
When you pull, you pull the parent first, and then use git-submodule<br>
to pull the correct versions of the subs. The parent is in control of<br>
the situation and it somewhat guarantees that you&#39;re getting all the<br>
right stuff. This is GREAT for consumers, but problematic for<br>
contributors. And even then, if consumers are pulling from a<br>
development branch while developers are pushing to it, then consumers<br>
might run into problems.<br>
<br>
Let&#39;s say you&#39;re doing a pull while I&#39;m doing a push. If I push the<br>
parent first, and I push it before you do, there is a chance that when<br>
you go to pull the subs those versions of the subs might not be there<br>
yet. Conversely, if I push the subs first and you grab an old parent,<br>
you&#39;ll be pulling old subs. No problem when you&#39;re pulling, but it&#39;s<br>
going to create problems when you go to push because you&#39;re that much<br>
further down the history.<br>
<br>
Of course, these problems exist even when you&#39;re dealing with a single<br>
repository on a team that believes in frequent commits, continuous<br>
integration, etc. And just by virtue of the fact that we have several<br>
repos with dependencies means that we&#39;re going to run into conflicts<br>
now and then. It just seems that the explicit references from parent<br>
to children adds a layer of complexity to this for both consumers and<br>
developers.<br>
<br>
This all make sense?<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
&gt;&gt; Cheers,<br>
&gt;&gt; Jon<br>
&gt;&gt;<br>
&gt;&gt; On Wed, 2008-04-16 at 22:39 -0400, David Chelimsky wrote:<br>
&gt;&gt;&gt; Hey all,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; We ran into some problems last night with the repos up at github. We<br>
&gt;&gt;&gt; initially thought it was a git-submodules bug. We learned that it<br>
&gt;&gt;&gt; was<br>
&gt;&gt;&gt; something else, but in the process of trying to find the source of<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; bug, we learned a few things about git-submodules and have decided<br>
&gt;&gt;&gt; that it creates an unfortunate set of complications and dependencies<br>
&gt;&gt;&gt; for a development effort like ours.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; To that end, we have simplified. No more submodules. To update, do<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; following:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; cd rspec-dev<br>
&gt;&gt;&gt; git pull<br>
&gt;&gt;&gt; rake git:update<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; See <a href="http://github.com/dchelimsky/rspec-dev/wikis/contributingpatches" target="_blank">http://github.com/dchelimsky/rspec-dev/wikis/contributingpatches</a><br>
&gt;&gt;&gt; for more info.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt; David<br>
<br>
_______________________________________________<br>
rspec-users mailing list<br>
<a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/rspec-users" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Bryan Ray<br><a href="http://www.bryanray.net">http://www.bryanray.net</a><br><br>&quot;Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.&quot;