Closed fenelon closed 10 years ago
Do you have examples where the lock file is sorted into different orders? It should be sorted by source URL in 1.7.2, so that looks right to me. What command triggers the shuffling?
@TimMoore here you go:
diff --git a/Gemfile.lock b/Gemfile.lock
index ccb6c4b..67f8021 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,4 +1,18 @@
GIT
+ remote: git://github.com/airblade/paper_trail.git
+ revision: 0c80986e59ee27c0a5ced0cbe4f0d07fc7f52f08
+ specs:
+ paper_trail (3.0.0.rc2)
+ activerecord (>= 3.0, < 5.0)
+ activesupport (>= 3.0, < 5.0)
+
+GIT
+ remote: git://github.com/edsonlima/clickatell.git
+ revision: 62d215c868ec4f9d6947f292810f9d92e4b72084
+ specs:
+ clickatell (0.8.2)
+
+GIT
remote: git://github.com/emberjs/ember-rails.git
revision: d21fe55fcfb19ad1bdb72b4367bb3e16662f6fc5
specs:
@@ -13,28 +27,14 @@ GIT
railties (>= 3.1)
GIT
- remote: git://github.com/intridea/oauth2.git
- revision: cd8a62e69cab6778fe9eae6637719e5cbfe1cff3
- specs:
- oauth2 (0.9.3)
- faraday (>= 0.8, < 0.10)
- jwt (~> 0.1.8)
- multi_json (~> 1.3)
- multi_xml (~> 0.5)
- rack (~> 1.2)
-
-GIT
- remote: git://github.com/paolochiodi/htmlcompressor.git
- revision: f378738641c2a7fd4517b4414a62940008a6770a
- specs:
- htmlcompressor (0.0.7)
- yui-compressor (~> 0.9.6)
-
-GIT
- remote: git://github.com/nicholasrq/lt-analytics.git
- revision: ccbc161d232b9bd63bbb37a94c868aa1ec1959c8
+ remote: git://github.com/fenelon/mainsms_api.git
+ revision: f228dc772785eca7e46929d8717c3126371f3d28
specs:
- lt-analytics (0.1.0)
+ mainsms_api (0.0.3)
+ active_attr (~> 0.7)
+ activesupport (~> 4.0)
+ hashie (~> 2.0)
+ httparty (~> 0.10)
GIT
remote: git://github.com/gregbell/active_admin.git
@@ -56,28 +56,28 @@ GIT
sass-rails
GIT
- remote: git://github.com/airblade/paper_trail.git
- revision: 0c80986e59ee27c0a5ced0cbe4f0d07fc7f52f08
+ remote: git://github.com/intridea/oauth2.git
+ revision: cd8a62e69cab6778fe9eae6637719e5cbfe1cff3
specs:
- paper_trail (3.0.0.rc2)
- activerecord (>= 3.0, < 5.0)
- activesupport (>= 3.0, < 5.0)
+ oauth2 (0.9.3)
+ faraday (>= 0.8, < 0.10)
+ jwt (~> 0.1.8)
+ multi_json (~> 1.3)
+ multi_xml (~> 0.5)
+ rack (~> 1.2)
GIT
- remote: git://github.com/fenelon/mainsms_api.git
- revision: f228dc772785eca7e46929d8717c3126371f3d28
+ remote: git://github.com/nicholasrq/lt-analytics.git
+ revision: ccbc161d232b9bd63bbb37a94c868aa1ec1959c8
specs:
- mainsms_api (0.0.3)
- active_attr (~> 0.7)
- activesupport (~> 4.0)
- hashie (~> 2.0)
- httparty (~> 0.10)
+ lt-analytics (0.1.0)
GIT
- remote: git://github.com/edsonlima/clickatell.git
- revision: 62d215c868ec4f9d6947f292810f9d92e4b72084
+ remote: git://github.com/paolochiodi/htmlcompressor.git
+ revision: f378738641c2a7fd4517b4414a62940008a6770a
specs:
- clickatell (0.8.2)
+ htmlcompressor (0.0.7)
+ yui-compressor (~> 0.9.6)
GIT
remote: git://github.com/smartinez87/exception_notification.git
@TimMoore is it possible if someone else from my team has an older version and after I pull the repo bundler fixes the Gemfile.lock at some point?
1.7.0 change the ordering from my 1.6.x. Then 1.7.2 changed it again.
@ngan Please use Bundler 1.6.6 or 1.7.2. They have the same ordering.
@fenelon Yes, older versions of Bundler could change the lock order. Get your entire team on the same release of Bundler (either 1.6.6 or 1.7.2) to keep the lock from changing.
I'm using bundle 1.7.2 on both my home and work machines. I have my dev directory synced with Dropbox, and I'm running guard-bundler on both. The two machines will get in edit wars, where Dropbox updates my Gemfile.lock every second or two. The only difference between the two versions is the order that the gems specified from Gthub are shown in. One version will be:
GIT
remote: git://github.com/jetthoughts/yaml_db.git
revision: 5f73cbd14adee939adf08574ec3bf6e05ee55889
ref: 5f73cbd
specs:
yaml_db (0.2.3)
GIT
remote: git://github.com/activeadmin/activeadmin.git
revision: 83059dc2894b7d887cb1a6061fbde741bd4d1854
ref: 83059dc
specs:
activeadmin (1.0.0.pre)
arbre (~> 1.0, >= 1.0.2)
bourbon
coffee-rails
formtastic (~> 2.3.0.rc3)
inherited_resources (~> 1.4.1)
jquery-rails
jquery-ui-rails (~> 5.0)
kaminari (~> 0.15)
rails (>= 3.2, < 4.2)
ransack (~> 1.0)
sass-rails
And a second later the other bundler will run, and Dropbox will update Gemfile.lock to have activeadmin come first. Could you please add code sorting the git repositories (perhaps sorting on the remote URL) to avoid this silly oscillation?
@fenelon so just to confirm: is it actually changing randomly for you? Or is it just sorting them once when you run bundle install
?
@dankohn 1.7.2 does sort by URL. Are you positive that it's running the same version on both machines? Does the same thing happen when you take Guard out of the equation?
@TimMoore thanks for the followup. It turns out that one machine had bundler 1.7.2 and one had 1.7.0. I upgraded and they now both agree.
Thanks for the confirmation, @dankohn. I'll go ahead and close this now, but if anyone has an example where 1.7.2 is using inconsistent ordering between runs or between machines that are all on 1.7.2, please add details and we can reopen.
I'm experiencing random Gemfile.lock changes. Gems with git urls get resorted from time to time. Here's the output of bundler environment.
bundle env