Feature #9711

Remove test-unit and minitest from stdlib.

Added by Hiroshi SHIBATA 11 months ago. Updated 9 months ago.

[ruby-core:61890]
Status:Closed
Priority:Normal
Assignee:Ryan Davis

Description

ref. #9660

We are hard to maintain test-unit and minitest for standard library.
I poropose to remove to their from stdlib.

see also my patches: https://github.com/hsbt/ruby/compare/extracted-test-suite?expand=1

my solution is that test-unit and minitest move to test directory.
their are used only ruby-core tests.

If people hope to use test-unit and minitest, they can download their from rubygems.

copy-test-unit-minitest.patch Magnifier (140 KB) Hiroshi SHIBATA, 04/26/2014 08:35 AM


Related issues

Related to Ruby trunk - Bug #9660: test/unit, minitest & bundler Closed 03/21/2014

Associated revisions

Revision 45970
Added by Hiroshi SHIBATA 10 months ago

  • test/runner.rb: remove dependency test-unit and minitest from stdlib when running with test-all. [Feature #9711]
  • test/testunit/*.rb: ditto.
  • test/lib: ditto.

Revision 45970
Added by Hiroshi SHIBATA 10 months ago

  • test/runner.rb: remove dependency test-unit and minitest from stdlib when running with test-all. [Feature #9711]
  • test/testunit/*.rb: ditto.
  • test/lib: ditto.

Revision 45974
Added by Shota Fukumori 10 months ago

  • lib/test: Removed because ruby's test cases now independent to
    lib/test by r45970. [Feature #9711]

    I'm still considering about the future of lib/minitest, lib/test.
    (bundling gems?)

Revision 45974
Added by Shota Fukumori 10 months ago

  • lib/test: Removed because ruby's test cases now independent to
    lib/test by r45970. [Feature #9711]

    I'm still considering about the future of lib/minitest, lib/test.
    (bundling gems?)

Revision 46011
Added by Shota Fukumori 10 months ago

  • bin/testrb: Removed. Forgot to remove in r45971. [Feature #9711]

Revision 46011
Added by Shota Fukumori 10 months ago

  • bin/testrb: Removed. Forgot to remove in r45971. [Feature #9711]

History

#1 Updated by Hiroshi SHIBATA 11 months ago

  • Tracker changed from Bug to Feature
  • Target version set to current: 2.2.0

#2 Updated by Vit Ondruch 11 months ago

I wholeheartedly support this idea.

#3 Updated by _ wanabe 11 months ago

  • Related to Bug #9660: test/unit, minitest & bundler added

#4 Updated by Shota Fukumori 10 months ago

I agree to do this :+1:

#5 Updated by Yui NARUSE 10 months ago

We discussed about this on DevelopersMeeting20140418Japan:

  • we use test/unit (with minitest) for our test-all -> we can solve it easy
  • minitest4 conflicts with minitest5/minitest.gem

Conclusion

  • hsbt separates test library for test-all and copy it to test/
  • sora_h decide how handle llib/test/unit
  • ryan decide how handle lib/minitest

#6 Updated by Hiroshi SHIBATA 10 months ago

I update my patch. this patch copy test-unit and minitest to test/lib and separate to dependecy from stdlib.

Could someone review this patch?

#7 Updated by Ryan Davis 10 months ago

Sorry it has taken me so long to respond. Sometimes I am slow at
choosing my words.

We are hard to maintain test-unit and minitest for standard library.
I poropose to remove to their from stdlib.

I'm not against moving minitest & test-unit into test for the sake of
maintainability.

I AM against shipping ruby without a testing library.

The Ruby community has a long history and culture centered around
testing. Removing all testing libraries from ruby betrays that culture
we've spent so long developing. It would be a shame to ship a ruby
that didn't support testing out of the box.

Ruby currently ships with minitest 4.7.5 and nobu/shota's "test-unit"
(quoted because, AFAIK, it is unrelated to the real test-unit gem
maintained by Kouhei Sutou). Test-unit is completely dependent on the
internals of minitest 4 to the point that I can't update minitest to
the latest version (5.3.3). In fact, I've accidentally broken
test-unit in the past when I updated lib/minitest. I don't want to do
this again.

I would be happy to have minitest 4 move to the test/minitest and even
have it merged completely with test/test-unit. I relinquish ownership
of test/minitest and consider it part of test/test-unit. I won't
maintain it further as I'm afraid of breaking test-unit and/or the
tests.

I would like to further propose that ruby still ship with minitest and
I would like to update that to minitest 5 (at some point, it doesn't
have to be now).

However, I do NOT think it should ship as lib/minitest. As we've seen,
there is too much incompatibility & confusion with gems shipping in
lib/. I've had numerous problems with rake, rdoc, and minitest because
of this. I'm sure I'm not alone in this.

I would like the packaging / installation process to be extended so
that these packages are all installed as real gems the same way any
other gem is installed. Upgrading, cleanup, and load paths should all
be done the same way they're normally done via rubygems. The gem specs
should not be modified. There should be zero difference between what
is installed by a ruby install and the actual gem of the same version.
I understand that this is a separate issue and am happy to file a new
ticket.

Summary:

  • Agree to move lib/minitest and lib/test into test/*.
  • I relinquish ownership of test/minitest and propose it be merged directly into test/test-unit.
  • I'd like to update ruby to ship with minitest 5, as a real gem.
  • I'd also like all the other bundled gems to ship as real gems.

#8 Updated by Martin Dürst 10 months ago

Ryan Davis wrote:

Sorry it has taken me so long to respond. Sometimes I am slow at
choosing my words.

Maybe slow, but I think you choose your words very well.

I AM against shipping ruby without a testing library.

The Ruby community has a long history and culture centered around
testing. Removing all testing libraries from ruby betrays that culture
we've spent so long developing. It would be a shame to ship a ruby
that didn't support testing out of the box.

This is very well put. I have said something similar at the most recent Ruby committers' meeting. I strongly agree with this. If Ruby comes with (e.g.) Rational and Complex built in, but without any testing functionality, that would be fundamentally wrong.

Ryan, I'd encourage you to open features for your proposals.

#9 Updated by Ryan Davis 10 months ago

BTW, the patch looks fine to me. Should it not do deletes from lib/* ?

#10 Updated by Hiroshi SHIBATA 10 months ago

the patch looks fine to me. Should it not do deletes from lib/* ?

Thanks for your review. I'll commit this tomorrow.
Please update or remove minitest library from lib/*.
I already noticed it @sora_h.

#11 Updated by Hiroshi SHIBATA 10 months ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r45970.


  • test/runner.rb: remove dependency test-unit and minitest from stdlib when running with test-all. [Feature #9711]
  • test/testunit/*.rb: ditto.
  • test/lib: ditto.

#12 Updated by Hiroshi SHIBATA 10 months ago

  • Status changed from Closed to Open
  • Assignee set to Ryan Davis

Hi, Ryan.

I and sora_h removed test-unit from stdlib.
Please remove minitest from stdlib too.

I would like the packaging / installation process to be extended so
that these packages are all installed as real gems the same way any
other gem is installed.

Sorry, I missed your above comments.
Today, We(Ruby committers) discussed your opinion.
We agreed that ruby shouldn't be release without test library.

But We have no solution yet. we need to discuss continuously.
I'll create follow tickets.

  1. Should we bundle test-unit2(http://rubygems.org/gems/test-unit)?
  2. Should we make gem installation mechanism with packaging?

These are main discussion theme at next developer meeting.
I coordinate it.

Thanks.

#13 Updated by Shota Fukumori 10 months ago

I agree that we should package testing library (at least one).

I prefer bundling test-unit2 and minitest5 gem in Ruby 2.2 --
if they have some backward compatibility or they're easy to upgrade from older versions.

I'd like to hear opinion from Kou (author of test-unit.gem) and Ryan. Thoughts?

#14 Updated by Shota Fukumori 10 months ago

  • Status changed from Open to Closed

Applied in changeset r46011.


  • bin/testrb: Removed. Forgot to remove in r45971. [Feature #9711]

#15 Updated by Kouhei Sutou 10 months ago

hsbt and sora_h, thanks for your works.

I'd like to hear opinion from Kou (author of test-unit.gem) and Ryan. Thoughts?

Should we comment about it on this ticket? Or on new tickets about them?

  1. Should we bundle test-unit2(http://rubygems.org/gems/test-unit)?
  2. Should we make gem installation mechanism with packaging?

I think that new tickets are better.

#16 Updated by Hiroshi SHIBATA 10 months ago

  • Status changed from Closed to Assigned

#17 Updated by Ryan Davis 9 months ago

  • Status changed from Assigned to Closed

I've removed lib/minitest in r46064

I've commented on ticket #9852 on what I think needs to happen, but I'd need help from someone who knows the build system intricacies to actually do this myself.

Closing this ticket.

Also available in: Atom PDF