-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Ruby 2.0 (trunk ruby) is not Ruby 1.9 #1539
Conversation
Ruby 2.0 (trunk ruby) is not Ruby 1.9
Wot? Bros, this will break every existing Gemfile on ruby-head. |
They were already broken as soon as ruby-head changed the version to ruby 2.0. It means that bundler incorrectly treats ruby 2.0 as ruby 1.9. :-/ |
The way people use this in Gemfiles is like so: if mri_19?
gem "ruby-debug19"
else
gem "ruby-debug"
end So this change breaks all of those gemfiles on ruby-head. :( |
Maybe we should add |
|
Heh, sorry Bad example. But back to my attempted original point: Does |
No, ruby-debug doesn't work with ruby-head. If people say Maybe you should introduce an object that represents the ruby version that people can do comparisons against. Something like this: if Bundler.ruby_version > "1.9"
...
else
...
end |
If that's all people want, they can already do |
Cool Story Bro. That's the C ABI version. ;-) |
Right... extensions are binary-compatible with 1.9! What does |
I agree with Jeremy here. |
I think Jeremy asked a question rather than stating an opinion. Does |
The reason for the flag is to deal with the fact that there are two commonly-used Ruby ABIs: 1.8 and 1.9. Its use-case is for native gems. Native gems using internal functionality that breaks even though the ABI is compatible is outside the scope of bundler, sadly. |
@wycats, given that, shouldn't this be reverted? |
If this is actually indicating ABI, then shouldn't we provide a way to differentiate between Ruby 1.9.0 and 1.9.1 (since the ABI changed)? |
No, because nobody uses 1.9.0. |
@tenderlove : this is a cheap shot. There is and never was a way for ruby-debug in MRI 1.9 or 2.0 to do the things that were possible in MRI 1.8. So the options left such as:
are all bad ones. And as you should know, the limited attempts to improve MRI YARV runtime for debugging haven't had much motion. |
@rocky this isn't a cheap shot about anything, please don't take offense. ruby-debug exposes Ruby's internal C apis, which it shouldn't do. It shouldn't do this because it causes a headache for ruby-core developers. When ruby-debug breaks, we get bugs reported saying that ruby broke C apis, when the truth is that internal apis changed. ruby-core cannot be held accountable for internal APIs changing, that's why they're internal. I think we can agree that exposing internal API is something you "shouldn't do". Weighing the pros and cons of "shouldn't do" is up to you. :-) Anyway, I don't particularly care what ruby-debug should or shouldn't do. The problem I'm dealing with is that I can't build it on trunk ruby, and (until recently rails/rails@a437986 ) it was required to be installed for development on rails core. |
@tenderlove i think the point @rocky was making was that in order for ruby-debug to work effectively it has to access ruby's private api. This may cause breakages and so on when the private API is changed between ruby versions, but there's really no other option (afaik) if we want ruby to have a decent debugger. If core implement a proper debugging API, then ruby-debug could hook into that and all would be well, but this hasn't happened yet. |
@banister - right. @tenderlove - So one could either criticize ruby-debug (which is in my opinion is a rather easy thing to do) or one could try to get support for debugging and run-time introspection better supported in MRI 1.9 and 2.0. |
Added `:ruby_20`, `:mri_20` and `:mingw_20` Also made same fix to `mingw_19?` as rubygems#1539 -- 19 is not 20.
Added `:ruby_20`, `:mri_20` and `:mingw_20` Also made same fix to `mingw_19?` as rubygems#1539 -- 19 is not 20.
Added :ruby_20, :mri_20 and :mingw_20, and made the same fix to mingw_19? as rubygems#1539 did -- 19 is not 20.
Here's something that appears in a lot of gemfiles: group :test do
gem 'rcov', :platform => [:ruby_18]
gem 'simplecov', :platform => [:ruby_19]
end Currently, on ruby 2.0 neither gem will install, since Either:
or:
|
Oof. I think this means ruby_19 is broken, and needs fixing badly. :( Your example with rcov/simplecov (and the other very common one, of |
Bundler treats trunk ruby as Ruby 1.9, when that is not true. This will make bundler return false for Ruby 2.0.