From: "kou (Kouhei Sutou)" Date: 2012-10-26T22:11:42+09:00 Subject: [ruby-dev:46273] [ruby-trunk - Feature #6875] Make test/unit default gem Issue #6875 has been updated by kou (Kouhei Sutou). I comment on this issue. I think that this issue is the right issue for talking about only test-unit.gemspec. If you want to talk about "default gem", #5481 is the right issue. If the latter is true, please use #5481. vo.x (Vit Ondruch) wrote: > kou (Kouhei Sutou) wrote: > Sorry, I am not sure I understand this example. I expect that current is Ruby 1.9.3 and expected is Ruby 2.0, but what is the difference? Sorry. Here is a correct example: test_xxx.rb: require "test/unit" class TestXXX < Test::Unit::TestCase def test_xxx assert_equal(3, 1 + 2) end end test_xxx_with_explicit_gem_test-unit.rb: gem "test-unit" require "./test_xxx" Current: % ruby test_xxx.rb # -> uses test/unit in StdLib % gem install test-unit % ruby test_xxx.rb # -> still uses test/unit in StdLib % ruby test_xxx_with_explicit_gem_test-unit.rb # -> uses test-unit gem Expected: % ruby test_xxx.rb # -> uses test/unit in StdLib (same) % gem install test-unit % ruby test_xxx.rb # -> uses test-unit gem (different) % ruby test_xxx_with_explicit_gem_test-unit.rb # -> uses test-unit gem (same) > > > 2) The gem usually contains code. It does not depend on some code lying somewhere in the StdLib > > > > It is right. (.gemspec for test/unit StdLib doesn't have any problems for it, doesn't it?) > > StdLib doesn't, but I cannot package such gem, because it is not gem. You doesn't need to package it. It should be included in Ruby's package itself. > > > 3) The gem could be usually found on rubygems.org. While there is test-unit available on rubygems.org, it is definitely different test-unit then the one shipped with Ruby. > > > > It is right. (.gemspec for test/unit StdLib doesn't have any problems for it, doesn't it?) > > It is not problem for StdLib, but how should I package something I don't have source for? You doesn't need to package it. It should be included in Ruby's package itself because the source is included in Ruby. > > > I'd really love to be able to break StdLib into independent rubygems > > > > The "rubygems" means that gem packages on RubyGems.org not RubyGems library itself, doesn't it? > > If it is true, the change doesn't depend on additional gem packages. > > No I really mean that StdLib should consist from real gems. Since we need them for packaging and easy updates. I don't think that "packaging as RPM" equal to "easy updates". For example, users can update by "gem update". It is also easy update. > In Fedora, we unbundled every gem from StdLib, i.e. the rake is not anymore part of StdLib. There is no reason to have it in StdLib, since we need only one version of Rake on system. There is a reason. We can use rake with "ruby -disable-gems" if rake is part of StdLib. See also https://bugs.ruby-lang.org/projects/ruby/wiki/StdlibGem#ToDo . The page describes advantages and drawbacks. Why "we need only one version of Rake on system"? Is it only for Rake or all libraries/softwares on Fedora? Fedora has python and python3 packages. Is it not related about "we need only one version of Rake on system"? It seems that some (or many) Rails users have one or more Rails versions on system. So I don't understand "we need only one version of Rake on system". > That is the purpose of RPM and YUM, to manage your packages. It allows easy updates when new rake version is available as well as it prevents multiple copies around the system. Does "multiple copies" means "rake 0.9.2 and rake 0.9.2.2 are on the same system"? I don't think that it is not "multiple copies"... > No for your 'gem', since there is no test-unit, just some test-unit shim, there is no way how to extract it from StdLib. We are already providing in Fedora full featured rubygem-test-unit, but how it is supposed the original part of StdLib? I will not extract it from StdLib. > For the rest, see my feedback in your pull request and thank you for pointing it out, since I am obviously highly interested in possible output. Thanks for your feedback. ---------------------------------------- Feature #6875: Make test/unit default gem https://bugs.ruby-lang.org/issues/6875#change-31610 Author: kou (Kouhei Sutou) Status: Closed Priority: Normal Assignee: sorah (Shota Fukumori) Category: lib Target version: 2.0.0 test/unitをdefault gemにするパッチです。 http://bugs.ruby-lang.org/projects/ruby/wiki/StdlibGem に従ってバージョンは2.0.0.0にしています。 私はtest-unitというgemを作っています。test-unit gemがインストールされるとバンドルされているtest/unitよりも優先してtest-unit gemの方が使われると嬉しいのでこのパッチを書きました。 -- http://bugs.ruby-lang.org/