Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Lock file oscilates on platform specific gem dependencies since 1.12.x #4798

Closed
dekellum opened this issue Jul 20, 2016 · 3 comments · Fixed by #4800
Closed

Lock file oscilates on platform specific gem dependencies since 1.12.x #4798

dekellum opened this issue Jul 20, 2016 · 3 comments · Fixed by #4800

Comments

@dekellum
Copy link
Contributor

I have a project that I frequently test locally with both cruby and jruby. The gemspec based dependencies include nokogiri which has specific ruby and java platform gems. When upgrading from bundler 1.11.2 to 1.12.5, I find that the lock file (which I check in to git) changes to include nokogiri (1.6.8-java) every time I jrake test (jruby) and is removed every time I rake test (cruby). These lock file changes do not occur with bundler 1.11.2, so I wonder what might have changed?

The lock file changes would just be nuisance except that my project also includes safeguards in tasks like rake tag and rake push to fail early if there are any dirty files in the git tree. Thus as it stands I can't use these tasks with bundler 1.12.5 unless I stick with one ruby platform.

Gemfile:

# -*- ruby -*-

source 'https://rubygems.org'

gemspec :name => 'syncwrap'

Gemfile.lock (after jruby is used):

PATH
  remote: .
  specs:
    syncwrap (2.8.1)
      aws-sdk (~> 1.46)
      json (>= 1.7.1, < 1.9)
      nokogiri (>= 1.5.9, < 1.7)
      term-ansicolor (~> 1.2.2)
      tins (~> 0.13.2)

GEM
  remote: https://rubygems.org/
  specs:
    aws-sdk (1.66.0)
      aws-sdk-v1 (= 1.66.0)
    aws-sdk-v1 (1.66.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
    json (1.8.3)
    json (1.8.3-java)
    mini_portile2 (2.1.0)
    minitest (5.8.4)
    nokogiri (1.6.8)
      mini_portile2 (~> 2.1.0)
      pkg-config (~> 1.1.7)
    nokogiri (1.6.8-java)
    pkg-config (1.1.7)
    rake (11.2.2)
    rdoc (4.0.1)
      json (~> 1.4)
    rjack-maven (3.0.5.0-java)
    rjack-tarpit (2.1.1)
      rake (>= 0.9.2.2, < 12)
      rdoc (>= 3.12, < 5)
    rjack-tarpit (2.1.1-java)
      rake (>= 0.9.2.2, < 12)
      rdoc (>= 3.12, < 5)
      rjack-maven (~> 3.0.4)
    term-ansicolor (1.2.2)
      tins (~> 0.8)
    tins (0.13.2)

PLATFORMS
  java
  ruby

DEPENDENCIES
  minitest (~> 5.8.4)
  rdoc (~> 4.0.1)
  rjack-tarpit (~> 2.1)
  syncwrap!

BUNDLED WITH
   1.12.5
@indirect
Copy link
Member

@segiddins is this an intentional change in 1.12? I don't remember anything that would explicitly cause this...

@segiddins
Copy link
Member

No, not intentional at all, at least on my part. I want to look into this when I have a chance.

@segiddins
Copy link
Member

Reproduced the bug, I'll try and look into it later. Thanks for the issue @dekellum !

homu added a commit that referenced this issue Jul 26, 2016
…direct

[Definition] Ensure gemspec dependencies include all lockfile platforms

Closes #4798

This is necessary since `gemspec`  declares platforms for the dependency as the reverse platform map of the generic local platform, thus missing out on all those platforms that aren't currently being resolved for
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants