ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: eregontp@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:97851] [Ruby master Misc#16778] Should we stop vendoring default gems code?
Date: Sun, 12 Apr 2020 10:45:56 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-85075.20200412104556.7174@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16778.20200411132639.7174@ruby-lang.org

Issue #16778 has been updated by Eregon (Benoit Daloze).


I think this is a great idea and it would make the stdlib really "just a set of gems".

I'm not sure what should happen regarding CI testing.

One issue might be that ruby/ruby changes frequently but the CI of e.g. ruby/ostruct might run infrequently because commits are less frequent there.
And yet it could be very useful to identity which ruby/ruby commit broke some standard library.

So Ruby implementations might still want to run the tests of at least a few default gems part of stdlib.
I think we should make that easy and somewhat standardized, without needing to vendor tests or anything like that.
Maybe it's as simple as "cd default_gem_dir && bundle install && bundle exec rake", with some helper to do it for all default gems or a predefined subset.

----------------------------------------
Misc #16778: Should we stop vendoring default gems code?
https://bugs.ruby-lang.org/issues/16778#change-85075

* Author: deivid (David Rodríguez)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
Currently ruby-core vendors all the code in default gems, and runs the tests for each of them.

Also, ruby-core continuously updates the vendored code of default gems to sync with the upstream repos. That's overhead work, not only from syncronizing the code itself, but it also requires perfect syncronization of releases to avoid including versions of default gems that are different from released versions.

Also, this causes confusion for contributors because the code lives "duplicated" in two different places. Some times contributors will open a PR in the ruby-core repo, only to find out that they need to go to the upstream repo and contribute it in there. And this rule is not even always followed and sometimes ruby-core contributors apply patches to the vendored code directly (many times to fix test-only issues inherent to the different structure of the core repository). These patches then need to be contributed back to the upstream repo.

I believe that all of that kind of defeats the point of "gemification" of the standard library.

Once some ruby code its gemified, it should be the new upstream's responsability to make sure the code works and it's properly tested, and ruby-core should be free'd from that responsability.

Maybe ruby-core could do something along the following lines:

* Remove all the vendored code from default gems.
* When this code is needed for internal tests, manage it as a development dependency, clone it as necessary on non source controlled locations, and use it from there.
* Maybe a file similar to `gems/bundled_gems` can be added for default gems indicating their versions and upstream repos, to ease things.
* Upon `make install`, clone the proper version of each default library and get it installed in the default $LOAD_PATH.
* Maybe add some bare high level CI checks to ensure that all default libraries can be properly required after `make install`, and that their executables (if they include any) can also be run.

This should bring several benefits to the development process:

* No more duplicated code.
* No more syncronization from upstream to ruby-core.
* No more syncronization from ruby-core to upstream.
* No more confusion around the canonical place to contribute.
* No more complexities derived from the different organization of the code depending on whether it lives in ruby-core or outside.  

I believe jruby already does something like this so it'd be interesting to get some input from them.

If this is a direction the ruby-core team would like to take, I'm happy to help @hsbt with small steps towards slowly approaching to this high level goal.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

  parent reply	other threads:[~2020-04-12 10:46 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11 13:26 [ruby-core:97828] [Ruby master Misc#16778] Should we stop vendoring default gems code? deivid.rodriguez
2020-04-11 13:49 ` [ruby-core:97829] " deivid.rodriguez
2020-04-11 15:07 ` [ruby-core:97831] " Greg.mpls
2020-04-11 16:17 ` [ruby-core:97832] " deivid.rodriguez
2020-04-11 19:02 ` [ruby-core:97834] " shevegen
2020-04-11 19:57 ` [ruby-core:97835] " deivid.rodriguez
2020-04-11 21:12 ` [ruby-core:97836] " v.ondruch
2020-04-11 22:24 ` [ruby-core:97839] " Greg.mpls
2020-04-11 22:27 ` [ruby-core:97840] " hsbt
2020-04-12  2:56 ` [ruby-core:97842] " mame
2020-04-12  3:29 ` [ruby-core:97844] " mame
2020-04-12  5:05 ` [ruby-core:97845] " grzegorz.jakubiak
2020-04-12 10:19 ` [ruby-core:97849] " deivid.rodriguez
2020-04-12 10:45 ` eregontp [this message]
2020-04-12 11:04 ` [ruby-core:97854] " deivid.rodriguez
2020-04-12 11:16 ` [ruby-core:97855] " deivid.rodriguez
2020-04-13  0:51 ` [ruby-core:97862] " Greg.mpls
2020-04-19  1:42 ` [ruby-core:97957] " hsbt
2020-04-19  7:47 ` [ruby-core:97961] " v.ondruch
2020-04-19  8:16 ` [ruby-core:97962] " grzegorz.jakubiak
2020-05-14  4:36 ` [ruby-core:98339] " hsbt
2020-06-15 11:28 ` [ruby-core:98806] " deivid.rodriguez
2020-10-26 20:48 ` [ruby-core:100590] " headius
2020-10-26 21:03 ` [ruby-core:100591] " marcandre-ruby-core
2020-10-27 12:58 ` [ruby-core:100603] " hsbt
2020-10-27 13:32 ` [ruby-core:100604] " deivid.rodriguez
2020-10-27 17:17 ` [ruby-core:100608] " eregontp
2020-10-27 22:21 ` [ruby-core:100613] " headius
2020-10-29 10:51 ` [ruby-core:100641] " hsbt
2020-10-29 19:42 ` [ruby-core:100656] " eregontp
2020-11-16 13:30 ` [ruby-core:100874] " deivid.rodriguez
2021-05-27 16:03 ` [ruby-core:104066] " deivid.rodriguez
2021-05-27 20:41 ` [ruby-core:104072] " takashikkbn
2021-05-27 22:30 ` [ruby-core:104074] " deivid.rodriguez
2021-05-27 22:56 ` [ruby-core:104075] " deivid.rodriguez
2021-05-28  4:17 ` [ruby-core:104076] " mame
2021-05-28  9:55 ` [ruby-core:104079] " deivid.rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-85075.20200412104556.7174@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).