https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112016-09-07T07:28:06ZRuby Issue Tracking SystemRuby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=603992016-09-07T07:28:06ZEregon (Benoit Daloze)
<ul></ul><p>Won't this make it harder to update bundler?</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=604582016-09-09T16:48:41Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>Hiroshi SHIBATA wrote:</p>
<blockquote>
<ul>
<li>bundler uses rspec for test suites. How to use rspec on ruby core repository?</li>
</ul>
</blockquote>
<p>Not only this, but the test suite also needs connection to internet to succeed. No other test needs this so far and I hope it will stay like that.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=604802016-09-12T05:13:34Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>Vit Ondruch wrote:</p>
<blockquote>
<p>Not only this, but the test suite also needs connection to internet to succeed. No other test needs this so far and I hope it will stay like that.</p>
</blockquote>
<p>There are many parts in Ruby that (would) need connection to the Internet for decent testing. Webrick, open_uri, net::http, and so on immediately come to my mind. Also rubygems of course. Also several i18n-related tests (for String#unicode_normalize/upcase/downcase/...), where data needs to be downloaded from the unicode.org Web site if not yet available.</p>
<p>In the case of the i18n tests, they get skipped if the Internet connection fails. My guess is that all the other components that I mention do something similar. So this should also be possible for bundler, even if it's not yet the case.</p>
<p>In general, it would be a bad idea to not have tests that try to connect to the Internet and exercise the relevant functionality, in particular for a language such as Ruby where one of the very big areas of use in Internet/Web related. But of course, it has also to be possible to test (to the extent possible) in a standalone environment.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=625412017-01-19T02:27:15Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li></ul> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=635252017-03-13T05:46:48Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul></ul><p>Created patch of PoC</p>
<p><a href="https://github.com/ruby/ruby/pull/1536" class="external">https://github.com/ruby/ruby/pull/1536</a></p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=654372017-06-22T01:18:26Zindirect (André Arko)andre@arko.net
<ul></ul><blockquote>
<p>the test suite also needs connection to internet to succeed</p>
</blockquote>
<p>The Bundler test suite no longer requires an internet connection to succeed.</p>
<blockquote>
<p>I propose to bundle bundler for stdlib as default gem on ruby core repository</p>
</blockquote>
<p>I am not sure what is needed for this, but I would like to help figure out what would be needed.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=656512017-07-06T08:59:27Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Target version</strong> set to <i>2.5</i></li></ul><blockquote>
<p>I am not sure what is needed for this, but I would like to help figure out what would be needed.</p>
</blockquote>
<p>I hope to promote bundler to default gems on standard libraries.</p>
<p>Requirements of default gems is following things:</p>
<ul>
<li>Works with cross-compilation(It's not related bundler)</li>
<li>Guarantee to work with ruby trunk. So we need to test bundler with test suite of ruby core.</li>
</ul>
<p>test suite is big problem. so bundler uses rspec. test suite of ruby core is customized test-unit/minitest.</p>
<p>We can choose some strategy.</p>
<ul>
<li>Rewrite bundler's rspec to minitest/spec</li>
<li>Ruby core bundle rspec and integrate rspec and test suite of ruby core.</li>
<li>Prepare isolation environment for bundler and rspec without test suite of ruby core. We add new test task named "make test-bundler` and iinvoke it on rubyci.</li>
<li>etc...</li>
</ul>
<p>These are only technical side problem.</p>
<p>I'm going to solve this problem used <code>isolation environment</code> as first.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=656602017-07-06T18:49:40ZEregon (Benoit Daloze)
<ul></ul><p>hsbt (Hiroshi SHIBATA) wrote:</p>
<blockquote>
<p>We can choose some strategy.</p>
<ul>
<li>Rewrite bundler's rspec to minitest/spec</li>
<li>Ruby core bundle rspec and integrate rspec and test suite of ruby core.</li>
<li>Prepare isolation environment for bundler and rspec without test suite of ruby core. We add new test task named "make test-bundler` and iinvoke it on rubyci.</li>
<li>etc...</li>
</ul>
<p>These are only technical side problem.</p>
<p>I'm going to solve this problem used <code>isolation environment</code> as first.</p>
</blockquote>
<p>I think isolation environment is the best strategy (or the only reasonable).</p>
<p>Rewriting tests is not an option for upstream development and is very time-consuming/error-prone (minitest/spec is a tiny subset of RSpec).</p>
<p>I am not sure what you mean by bundling rspec, but rspec should not be available to normal Ruby users like default gems.<br>
It's a private dependency needed to run tests, and it probably makes most sense to install it as a gem when running the tests.</p>
<p>I suspect it might also be difficult to run the tests in-tree.<br>
In that case I think it makes sense to require an installed Ruby to run more integration-like tests.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=656992017-07-09T14:00:45Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>The upstream version of minitest 4.7.5 supported spec syntax. It does not probably support all the RSpec features, but might be worth of considering ...</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=657282017-07-11T03:34:46Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul></ul><p>I added <code>test-bundler</code> task to my experimental branch.</p>
<p><a href="https://github.com/ruby/ruby/pull/1536/commits/5aa6d9a4340f8e6a54c9411e56c835c7f026abe3" class="external">https://github.com/ruby/ruby/pull/1536/commits/5aa6d9a4340f8e6a54c9411e56c835c7f026abe3</a></p>
<p>It install rspec under the $(srcdir)/.bundle directory and use it by bundler test.</p>
<p>But many of examples still failed. I'm going to investigate and fix it.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=658492017-07-19T21:27:30Zindirect (André Arko)andre@arko.net
<ul></ul><blockquote>
<p>I added test-bundler task to my experimental branch.</p>
</blockquote>
<p>Thank you for your work on this. Please contact me in the Bundler slack if you have any questions or would like any help with this. I am happy to help fix the tests.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=659572017-07-27T05:11:15Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul></ul><p>I've added <code>make test-bundler</code> task to the ruby core.</p>
<p>see <a href="https://github.com/ruby/ruby/pull/1536" class="external">https://github.com/ruby/ruby/pull/1536</a></p>
<p>Maybe, I tested this patch with macOS only. Probably the following task is not compatible all of the supported platform.</p>
<p><a href="https://github.com/ruby/ruby/pull/1536/files#diff-7e056ddc530791272d363e50c1f25647R488" class="external">https://github.com/ruby/ruby/pull/1536/files#diff-7e056ddc530791272d363e50c1f25647R488</a></p>
<p>I found problems with bundler test suite before <code>make install</code>environment.</p>
<ol>
<li>Tests of <code>bundle install</code> with native extensions relied on installed ruby interpreter.</li>
<li>Tests of “default gems” are failed. Because they are not installed before <code>make install</code>
</li>
<li>Tests of “bundler exec” with gem installed Gemfile relied on installed ruby interpreter.(ex. shebang of rack command use it)</li>
<li>bundler tests require “groff” command for man verification. ruby core could not prepare it.</li>
<li>Some tests depend on the directory structure of bundler/bundler.</li>
</ol>
<p>I omitted or added workaround to theirs.</p>
<p><a href="https://github.com/hsbt/ruby/blob/e16f39690e2e7843690f691e9f68e3371aba96f3/spec/bundler.patch" class="external">https://github.com/hsbt/ruby/blob/e16f39690e2e7843690f691e9f68e3371aba96f3/spec/bundler.patch</a></p>
<p>I have a happy news. <code>make test-bundler</code> results is here</p>
<p>2269 examples, 0 failures, 3 pending</p>
<p>I ignored 40 examples. but I got green results of most all of examples.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=661932017-08-16T02:55:02Zshevegen (Robert A. Heiler)shevegen@gmail.com
<ul></ul><p>I think that this is a pretty big undertaking, irrelevant of pros or cons<br>
to it (which surely exist).</p>
<p>Bundler is popular, there is no doubt about this even though I myself do not<br>
use it - at <a href="https://rubygems.org/stats" class="external">https://rubygems.org/stats</a> bundler is ranked #1 by a fair margin<br>
(rank #2 is multi_json and rank #3 is rake).</p>
<p>Since I myself am not using bundler, I feel it would be unjust to comment<br>
on it pro or con, others can do so. But may I suggest something else,<br>
actually - gemify the remaining stdlib parts first before prioritizing<br>
on bundler integration into rubygems 3.x, which then will also be<br>
distributed with the next ruby releases?</p>
<p>I am not sure what is missing aside from fileutils and strscan, if this<br>
is up to date (I am not sure, sorry; I thought there may be more but<br>
I can not find it right now - see the roadmap for 2.5 ... have there<br>
been any ruby core meetings in 2017? Probably have not been added to<br>
2.5 or perhaps the meetings discussed past 2.5 situation).</p>
<p><a href="https://bugs.ruby-lang.org/projects/ruby-trunk/roadmap" class="external">https://bugs.ruby-lang.org/projects/ruby-trunk/roadmap</a></p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=663852017-08-31T07:19:44Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>It's OK as long as bundling bundler makes users happy (and I believe it would).</p>
<p>Matz.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=664932017-09-06T02:37:16Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul></ul><p>I update my working branch.</p>
<p><a href="https://github.com/ruby/ruby/pull/1536" class="external">https://github.com/ruby/ruby/pull/1536</a></p>
<p>Changes in this branch:</p>
<a name="Directory-Structure"></a>
<h4 >Directory Structure<a href="#Directory-Structure" class="wiki-anchor">¶</a></h4>
<p>I organized bundler integration like this:</p>
<pre><code> root -+- lib -+- bundler/*
| |
| +- bundler.gemspec
| |
| +- rubygems/*
| |
|
|
+- spec -+- bundler/*
|
+- rubyspec
|
</code></pre>
<p>Differences from bundler repo are gemspec and rspec examples locations.<br>
I'm going to send a pull request adopting Ruby core directory structure to bundler upstream.</p>
<a name="Exclude-some-rspec-examples-for-Ruby-core"></a>
<h4 >Exclude some rspec examples for Ruby core.<a href="#Exclude-some-rspec-examples-for-Ruby-core" class="wiki-anchor">¶</a></h4>
<p>Some of the bundler examples need to installed Ruby interpreter. But Ruby core test suite doesn't<br>
use installed ruby interpreter. Therefore, It is necessary to exclude examples that require the<br>
installed ruby interpreter.</p>
<p>I also send a pull request these exclusions used rspec filter condition to bundler repo.</p>
<p>Finally, We need to show results of "test-bundler" on Ruby CI (<a href="https://rubyci.org" class="external">https://rubyci.org</a>).<br>
I will make patches for bundler integration to ruby/rubyci and ruby/chkbuild.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=664952017-09-06T04:39:41Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>I don't understand it. Why is it not simple bundled gem similartly to minitest, test-unit, rake, etc? This gems broken to Ruby directories were always the worst idea. It could make sense when Ruby have not shipped with Rubygems, but nowadays?</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=664962017-09-06T05:00:23Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>vo.x (Vit Ondruch) wrote:</p>
<blockquote>
<p>I don't understand it. Why is it not simple bundled gem similartly to minitest, test-unit, rake, etc? This gems broken to Ruby directories were always the worst idea. It could make sense when Ruby have not shipped with Rubygems, but nowadays?</p>
</blockquote>
<p>Rubygems itself is going to depend on bundler. It must exist beforehand. Bundled gem won't work.</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=665522017-09-08T08:45:51Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r59779.</p>
<hr>
<p>Merge bundler to standard libraries.</p>
<p>rubygems 2.7.x depends bundler-1.15.x. This is preparation for<br>
rubygems and bundler migration.</p>
<ul>
<li>lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4</li>
<li>spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches.
<ul>
<li><a href="https://github.com/bundler/bundler/pull/6007" class="external">https://github.com/bundler/bundler/pull/6007</a></li>
<li>Exclude not working examples on ruby repository.</li>
<li>Fake ruby interpriter instead of installed ruby.</li>
</ul>
</li>
<li>Makefile.in: Added test task named <code>test-bundler</code>. This task is only<br>
working macOS/linux yet. I'm going to support Windows environment later.</li>
<li>tool/sync_default_gems.rb: Added sync task for bundler.</li>
</ul>
<p>[Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Bundle bundler to ruby core (Closed)" href="https://bugs.ruby-lang.org/issues/12733">#12733</a>]<a href="/issues/12733">[ruby-core:77172]</a></p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=686012017-12-23T00:35:56Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li></ul><p>I postpone merging bundler to stdlib.<br>
I reverted this feature ar r61416</p> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=686432017-12-25T17:51:54Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Target version</strong> changed from <i>2.5</i> to <i>2.6</i></li></ul> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=689282017-12-25T18:15:13Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Target version</strong> deleted (<del><i>2.6</i></del>)</li></ul> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=705322018-02-21T07:32:48Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-6 priority-4 priority-default closed" href="/issues/14219">Bug #14219</a>: package size of Ruby 2.5 is larger than 2.4</i> added</li></ul> Ruby master - Feature #12733: Bundle bundler to ruby corehttps://bugs.ruby-lang.org/issues/12733?journal_id=747262018-11-02T23:08:10Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r65509.</p>
<hr>
<p>Added bundler as default gems. Revisit [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Bundle bundler to ruby core (Closed)" href="https://bugs.ruby-lang.org/issues/12733">#12733</a>]</p>
<ul>
<li>bin/<em>, lib/bundler/</em>, lib/bundler.rb, spec/bundler, man/*:<br>
Merge from latest stable branch of bundler/bundler repository and<br>
added workaround patches. I will backport them into upstream.</li>
<li>common.mk, defs/gmake.mk: Added <code>test-bundler</code> task for test suite<br>
of bundler.</li>
<li>tool/sync_default_gems.rb: Added sync task for bundler.</li>
</ul>