Граф коммитов

37 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA ab5aade5ab Removed executable of racc 2023-06-08 17:25:38 +09:00
David Rodríguez 8819dc4323 [rubygems/rubygems] Always rely on $LOAD_PATH when jumping from exe to lib
Normally, we use `require_relative` when requiring internal code.
However, Bundler may also load external code (for example, bundler
plugins), and when that external code loads Bundler itself, using
`require_relative` without setting up the `$LOAD_PATH` may lead into
double load errors.

For example, when testing a Gemfile using plugins using our source code
tree, I get the following:

```
➜ plugins-dup ~/Code/rubygems/rubygems/bundler/exe/bundle
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.5.0.dev
Installing extended_bundler-errors 0.3.3
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/version.rb:4: warning: already initialized constant Bundler::VERSION
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/version.rb:4: warning: previous definition of VERSION was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/worker.rb:5: warning: already initialized constant Bundler::Worker::POISON
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/worker.rb:5: warning: previous definition of POISON was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:183: warning: already initialized constant Bundler::FileUtils::VERSION
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:183: warning: previous definition of VERSION was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2165: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2165: warning: previous definition of S_IF_DOOR was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2461: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2461: warning: previous definition of DIRECTORY_TERM was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2569: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2569: warning: previous definition of OPT_TABLE was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2627: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2627: warning: previous definition of LOW_METHODS was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2634: warning: already initialized constant Bundler::FileUtils::METHODS
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2634: warning: previous definition of METHODS was here
Failed to install plugin `extended_bundler-errors`, due to Bundler::Plugin::MalformattedPlugin (ArgumentError: Trying to register Bundler::GemfileError for status code 4 but
Bundler::GemfileError is already registered)
```

Changing this to always use `$LOAD_PATH` fixes the problem.

https://github.com/rubygems/rubygems/commit/121a861c39
2023-06-06 10:52:54 +09:00
Hiroshi SHIBATA c7bb8d67b7 [ruby/irb] Removed Release Version and Revisions for old VCS software
https://github.com/ruby/irb/commit/07fae94862
2023-01-11 22:29:09 +00:00
David Rodríguez 8f05e4f54b Update Bundler to 2.4.1 & and RubyGems to 3.4.1 2022-12-25 05:55:36 +09:00
Hiroshi SHIBATA bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +09:00
Takashi Kokubun 1c0c1c8098 [ruby/erb] Drop deprecated -S option from erb command
We attempted to remove things like this and reverted all of them, but I
think nobody relies on this unlike the positional arguments of
`ERB#initialize`.

https://github.com/ruby/erb/commit/92fde7e403
2022-11-24 22:49:21 +00:00
Hiroshi SHIBATA 8dfc077f70 Added syntax_suggest cli and resolve failing exapmle with it 2022-08-26 12:15:47 +09:00
Hiroshi SHIBATA 678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
Paul Kuruvilla 840bef0e2c [rubygems/rubygems] Remove extra closing bracket in version warning
https://github.com/rubygems/rubygems/commit/a3b9f19080
2022-03-14 05:43:17 +09:00
Ulysse Buonomo 5348a34504 [ruby/rdoc] Relative loading for easier development (https://github.com/ruby/rdoc/pull/821)
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.

Discussion started at https://github.com/ruby/rdoc/pull/817.

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>

https://github.com/ruby/rdoc/commit/aa41bd48eb

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-02-12 15:06:06 +09:00
st0012 3fb1f411ed [ruby/irb] require_relative can't be used for default gems' exe files
The `exe` folder and `lib` folder of default gems don't locate under the
same place. While `exe/irb` will be under the gem folder, `irb.rb` will be
under `lib/ruby/VERSION/`.

So `require_relative` will make `irb` unuseable when shipped with Ruby.

Related discussion in the comments: https://github.com/ruby/irb/pull/335

https://github.com/ruby/irb/commit/99d3aa979d
2022-01-18 15:56:48 +09:00
st0012 81b604fb00 [ruby/irb] Use require_relative to require lib files
1. `require` can mislead Ruby to load system irb's files and cause
   constant redefined warnings as other code loads the same module/class
   from lib folder.
2. Most files already use `require_relative`.

https://github.com/ruby/irb/commit/848d339f2e
2022-01-17 14:23:40 +09:00
David Rodríguez 7bd25b9753 [rubygems/rubygems] Print warning when running potentially problematic rubygems + ruby combinations
https://github.com/rubygems/rubygems/commit/d6df0b7de0

Co-authored-by: André Arko <andre@arko.net>
2021-12-21 06:48:27 +09:00
David Rodríguez a350ed4123 [rubygems/rubygems] Remove ancient check
https://github.com/rubygems/rubygems/commit/d647ab5607
2021-12-21 06:48:26 +09:00
aycabta 90afe5f11f [ruby/irb] Move IRB::TOPLEVEL_BINDING from exe/irb to lib/irb/workspace.rb
https://github.com/ruby/irb/commit/e736a77076
2021-09-10 06:37:07 +09:00
Marc-Andre Lafortune 3503c94af5 [ruby/irb] Avoid loading files' local variables [Bug #17623]
https://github.com/ruby/irb/commit/b12f0cb8e2
2021-09-10 06:37:06 +09:00
Hiroshi SHIBATA 4de32b3556
Removed unused option on racc 2020-09-28 18:53:25 +09:00
Hiroshi SHIBATA 87726143ef
Fixed the wrong variable for --executable flag 2020-09-28 18:53:25 +09:00
Marc-Andre Lafortune 97d1a381e1
[Fixes #137] Improve reporting 2020-09-28 18:07:24 +09:00
Hiroshi SHIBATA 3da3c2747f
fixup d6a94a0c4b 2020-09-28 17:55:08 +09:00
Hiroshi SHIBATA d6a94a0c4b
Removed useless RCS revisions 2020-09-28 17:39:59 +09:00
Lars Kanis 8d68f54c94 Fix erb executable
Run ERb processing unconditionally since __FILE__ and $0 doesn't match
in a gem context.
2020-08-25 18:11:43 +09:00
Hiroshi SHIBATA 8c97883b73
Promote erb to default gems 2020-08-21 20:18:44 +09:00
Hiroshi SHIBATA 1d889c9656 Sync Bundler PR #3624 with HEAD commits 2020-05-22 20:32:30 +09:00
Nobuyoshi Nakada aca935a670
Fixed typos in racc 2020-04-27 15:28:06 +09:00
Hiroshi SHIBATA a6864f6d2f
Removed the old executables of racc
[ruby-core:93516][Feature #15982]

  https://github.com/ruby/racc/pull/123
2020-01-01 07:42:42 +09:00
Nobuyoshi Nakada e68999c82c
Fixed misspellings
Fixed misspellings reported at [Bug #16437], for default gems.
2019-12-20 12:19:45 +09:00
David Rodríguez c50c2354cf [bundler/bundler] Require relatively from exe/ when possible
https://github.com/bundler/bundler/commit/e4cbb91b7d
2019-08-18 13:45:05 +09:00
David Rodríguez 33fdd87227
[bundler/bundler] Revert "Migrate requires from exe/ to also be relative"
This reverts commit d9d2bf6d522dd36d1ef2732e87cef8b7cba729fd.

https://github.com/bundler/bundler/commit/eeb2ff1561
2019-08-03 09:29:56 +09:00
David Rodríguez a27198f648
[bundler/bundler] Migrate requires from exe/ to also be relative
https://github.com/bundler/bundler/commit/d9d2bf6d52
2019-08-03 09:29:55 +09:00
Hiroshi SHIBATA 1a2546c2be Backport racc-1.4.15 from upstream. 2019-06-19 18:17:25 +09:00
hsbt 68ddd4d300 Merge Bundler 2.1.0.pre.1 as developed version from upstream.
a53709556b

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 06:01:35 +00:00
hsbt e97741e12a Merge Bundler 2.0.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 13:10:58 +00:00
hsbt 91533d9ab1 Downgrade Bundler 1.17.x from 2.0.0.
We have the platform issue on heroku:
    * https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305
    * https://github.com/heroku/heroku-buildpack-ruby/issues/833

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 03:07:37 +00:00
hsbt f62c3847b5 Revert "Remove `libexec/bundle_ruby`"
This reverts commit 3f70860492.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-05 11:29:56 +00:00
kazu 3f70860492 Remove `libexec/bundle_ruby`
see r65979
[Bug #15291][ruby-dev:50663]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-05 11:20:29 +00:00
hsbt a943328194 Use stub executables generated by RubyGems istead of original executables.
It resolved the conflict issues when invoking `gem i rdoc` and the binstub
issues with Bundler and Rails.

  [Bug #5060][ruby-core:38257][Fix GH-2023]

  * https://github.com/rubygems/rubygems/pull/2338
  * https://github.com/heroku/heroku-buildpack-ruby/issues/829

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-25 01:20:00 +00:00