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

Skip non-local dependencies when running with --local #3026

Merged
merged 3 commits into from
May 13, 2014

Conversation

mvz
Copy link
Contributor

@mvz mvz commented May 10, 2014

This is a second attempt at a fix for #2774. It is an improvement on #2988 in that:

  • It doesn't require the addition of a platform 'rubinius'
  • It more broadly solves the problem by also skipping, e.g., gems marked :mri_18 when run on MRI 2.0.

@indirect
Copy link
Member

I'm very unsure why this test is failing, but in real life, this already works fine:

$ bundle -v
Bundler version 1.6.2

$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

$ cat Gemfile
platform :rbx do
  gem "rspec"
end

$ bundle install --local
Using bundler 1.6.2
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

In fact, you don't even have to pass --local... Bundler notices it doesn't need to get any gems, and just completes without it:

$ bundle install
Using bundler 1.6.2
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

What are you trying to make work that doesn't work already?

On May 10, 2014, at 9:17 AM, Matijs van Zuijlen [email protected] wrote:

This is a second attempt at a fix for #2774. It is an improvement on #2988 in that:

It doesn't require the addition of a platform 'rubinius'
It more broadly solves the problem by also skipping, e.g., gems marked :mri_18 when run on MRI 2.0.
You can merge this Pull Request by running

git pull https://github.com/mvz/bundler skip-non-local-deps
Or view, comment on, or merge it at:

#3026

Commit Summary

Add tests demonstrating issue #2774
Skip non-local dependencies more rigourously
File Changes

M lib/bundler/definition.rb (1)
M spec/install/gems/platform_spec.rb (26)
Patch Links:

https://github.com/bundler/bundler/pull/3026.patch
https://github.com/bundler/bundler/pull/3026.diff

Reply to this email directly or view it on GitHub.

@mvz
Copy link
Contributor Author

mvz commented May 11, 2014

Your first example probably works fine because you actually have rspec installed for your current ruby. I will add that bit to #2774 as will, as it is an important detail.

@mvz
Copy link
Contributor Author

mvz commented May 13, 2014

The build is green now :-).

andremedeiros pushed a commit that referenced this pull request May 13, 2014
Skip non-local dependencies when running with --local
@andremedeiros andremedeiros merged commit 09b47fa into rubygems:master May 13, 2014
@andremedeiros
Copy link
Member

Thank you, @mvz :-)

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 this pull request may close these issues.

3 participants