Commit graph

14659 commits

Author SHA1 Message Date
Takashi Kokubun
c28177cd57 RJIT: Print an error message first
Creating a backtrace can crash if RJIT is triggered by branch_stub_hit.
In that case, it's useful to at least print the error message.
2023-12-20 09:17:46 -08:00
Stan Lo
31959f1f13 [ruby/irb] Bump version to v1.11.0
(https://github.com/ruby/irb/pull/818)

7421359b92
2023-12-20 19:11:02 +09:00
Burdette Lamar
4ad1007fd2 [ruby/irb] [DOC] Change indexes.rdoc to indexes.md
(https://github.com/ruby/irb/pull/812)

* Change indexes.rdoc to indexes.md

* Change indexes.rdoc to indexes.md

* Change indexes.rdoc to indexes.md

b1cd53cbf7
2023-12-20 19:11:02 +09:00
Stan Lo
2793a30b69 [ruby/irb] Warn users about errors in loading RC files
(https://github.com/ruby/irb/pull/817)

1. Because `IRB.rc_file` always generates an rc file name, even if the
   file doesn't exist, we should check the file exists before trying to
   load it.
2. If any type of errors occur while loading the rc file, we should
   warn the user about it.

37ffdc6b19
2023-12-20 19:11:01 +09:00
Takashi Kokubun
8d5af353b2 RJIT: Avoid retaining comments unless --rjit-dump-disasm
This significantly reduces retained objects on RJIT.
2023-12-19 00:05:19 -08:00
Takashi Kokubun
eb872d1752 RJIT: Share rb_vm_insns_count for vm_insns_count 2023-12-18 23:55:40 -08:00
Nobuyoshi Nakada
46085ef970 [DOC] No ducuments for internal library 2023-12-19 10:20:40 +09:00
Samuel Giddins
83bdf127b8 Avoid warning when requiring bigdecimal/util when bigdecimal is in gemfile 2023-12-16 17:34:45 +09:00
Hiroshi SHIBATA
80d63fbea5 [ruby/readline] Bump up v0.0.4
7dbc5bd8d9
2023-12-16 13:49:13 +08:00
hogelog
cb636fe707 [ruby/readline] Fix readline-ext gem loading in non Unix-like environments
6e1e5d0eb8
2023-12-16 13:49:12 +08:00
ima1zumi
20fbdae5fe [ruby/reline] Bump version to 0.4.1
(https://github.com/ruby/reline/pull/612)

8937279e0f
2023-12-16 13:47:04 +08:00
Hiroshi SHIBATA
4fd3c85acd
[ruby/ipaddr] Bump up v1.2.6
247459faa5
2023-12-16 13:20:55 +08:00
Hiroshi SHIBATA
8936bb74c6 [ruby/abbrev] Bump up v0.1.2
b362e8e3b9
2023-12-16 13:06:47 +08:00
Hiroshi SHIBATA
2b3fc0407a
[ruby/securerandom] Bump up v0.3.1
890d659970
2023-12-16 12:10:38 +08:00
Hiroshi SHIBATA
1a244730a9
[ruby/open3] Bump up v0.2.1
b890922205
2023-12-16 11:48:49 +08:00
Hiroshi SHIBATA
6c7c4ac407 [ruby/rdoc] Bump up v6.6.2
895f1affc0
2023-12-16 11:42:30 +08:00
Hiroshi SHIBATA
711e85674e
Pin versions that are RubyGems 2.5.1 and Bundler 2.5.1 2023-12-16 10:13:35 +08:00
Samuel Giddins
f4e9336d43
Partly pick commit from https://github.com/rubygems/rubygems/pull/7285
Refactor vendoring to allow validating vendoring is reproducible

  Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced
2023-12-16 10:13:20 +08:00
David Rodríguez
0ff34aa13e [rubygems/rubygems] More improves to default gem home selection for installation
966daf7d42
2023-12-16 10:07:05 +08:00
David Rodríguez
299eb8d117 [rubygems/rubygems] Improve command suggestion when gems are missing
Previous attempt to use a full path when the running version is
different than the one that would be activated by default are different
was not correct.

This is because if this error happens in a `bundle exec` context, the
`Gem.loaded_specs` is cleared because we're in an exec'd process, so
will be always using a full path in these cases.

This alternative approach should do what I was expecting.

e0bb8bf51b
2023-12-16 10:06:07 +08:00
David Rodríguez
c8e9cd2b8b [rubygems/rubygems] Fix Ruby DSL no longer working as expected
f6258e5679

Co-authored-by: AndrewSwerlick <andrew.swerlick@gmail.com>
2023-12-16 10:04:38 +08:00
Martin Emde
f933cde939 [rubygems/rubygems] Let the guards have some space to breathe
73f1609715
2023-12-15 19:36:24 +00:00
Martin Emde
d9b39093e2 [rubygems/rubygems] Use a mutex around Checksum::Store @store access
Not wrapping to_lock since access to it is single threaded and
read-only at the time of writing the lockfile.

3b53aa1b12
2023-12-15 19:36:24 +00:00
Martin Emde
1cfe874ef8 [rubygems/rubygems] Remove test-only & unused methods from Checksum::Store
79636dec12
2023-12-15 19:36:24 +00:00
Samuel Giddins
5a66ea23d2 [rubygems/rubygems] Use mkdir_p helper in bundler.rb
Small refactor, no functional change

5edb7a1026
2023-12-15 15:32:56 +00:00
Nobuyoshi Nakada
20f4f00764 [ruby/rdoc] [DOC] nodoc for probably internal methods
f7dd147a8c
2023-12-16 00:26:39 +09:00
Nobuyoshi Nakada
e15d690db1 [ruby/rdoc] [DOC] Add missing documents
e4c90340d0
2023-12-16 00:26:37 +09:00
Nobuyoshi Nakada
578eb02b16 [ruby/rdoc] Require fileutils before using it
edb2523018
2023-12-16 00:25:53 +09:00
Nobuyoshi Nakada
b257181ccc [ruby/rdoc] Remove unused method RDoc::Encoding.remove_frozen_string_literal
7a8e9a97fa
2023-12-16 00:25:51 +09:00
Samuel Giddins
1cd4b59e8c [rubygems/rubygems] Save array allocation for every dependency in Gemfile
Only need to check for lack of git key when branch option is present

ebfca1b389
2023-12-15 14:53:10 +00:00
Samuel Giddins
ca7f7c0f51 [rubygems/rubygems] Refactor vendoring to allow validating vendoring is reproducible
Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced

7c425d49dd
2023-12-15 14:48:25 +00:00
David Rodríguez
7c72755da8 [rubygems/rubygems] Fix ruby setup.rb leaving traces in source folder
It's the `Gem::Installer` below what installs executables, and the code
being deleted here is now actually creating a `gems/` folder in the root
of the source repo when running `ruby setup.rb`.

0e69a8b0d6
2023-12-15 11:52:38 +00:00
Hiroshi SHIBATA
c3ae4b6ae1
Revert "[Bug #20060] Properly return matched gem name in case of EXACT"
This reverts commit 75c40802cb.

  This change is now working correctly with warning cases.
2023-12-15 14:06:53 +08:00
David Rodríguez
8e37cd8a8b Fix gem detection for names with dash 2023-12-15 14:04:36 +08:00
Kevin Newton
8bbe835cd8
Bump prism to version 0.19.0 2023-12-14 15:06:09 -05:00
David Rodríguez
a79a1d3028 [rubygems/rubygems] Upgrade vendored libraries
To match the versions that will be included in final ruby release.

84394919fb
2023-12-14 15:04:22 +00:00
Hiroshi SHIBATA
e3631277c3
Removed duplicated LICENSE files 2023-12-14 20:22:49 +08:00
Vít Ondruch
612616925b
[rubygems/rubygems] Allow "default_user_install" to be overridden.
For Ruby re-distributors, automatic user-install might be the right
default. Therefore printing warning about installing into user directory
is not always desirable. Let the default_user_install method be
customizable.

2320dba544
2023-12-14 20:22:49 +08:00
David Rodríguez
45b511433d
[rubygems/rubygems] Improve install advice when some gems are not found
This problem is quite specific to our dev environment, but I guess the
fix could be handy for other situations.

After merging a change to treat default gems as regular gems, I get this
when trying to run `rubocop` on our repo:

```
$ bin/rubocop  --only Performance/RegexpMatch
Could not find json-2.6.3 in locally installed gems
Run `bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems.
```

However, when running the suggested command, nothing changes and I still
get the same error:

```
$ bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb
Using ast 2.4.2
Using bundler 2.4.10
Using json 2.6.3
Using parallel 1.23.0
Using racc 1.7.1
Using parser 3.2.2.3
Using rainbow 3.1.1
Using regexp_parser 2.8.1
Using rexml 3.2.5
Using rubocop-ast 1.29.0
Using ruby-progressbar 1.13.0
Using unicode-display_width 2.4.2
Using rubocop 1.52.1
Using rubocop-performance 1.14.2
Bundle complete! 2 Gemfile dependencies, 14 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

$ bin/rubocop  --only Performance/RegexpMatch
Could not find json-2.6.3 in locally installed gems
Run `bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems.
```

The problem is that our `bin/rubocop` script uses the development
version of Bundler (which has the change causing the problem), but the
advice recommands the default version of Bundler, which does not yet
have the change.

This commit changes the advice to recommend to use the same version of
Bundler that run into the problem in the first place.

So in the above situation you now get:

```
$ bin/rubocop  --only Performance/RegexpMatch
Could not find json-2.6.3 in locally installed gems
Run `/Users/deivid/code/rubygems/rubygems/bundler/exe/bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems.
```

And running that fixes the problem:

```
$ /Users/deivid//rubygems/rubygems/bundler/exe/bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb
Fetching gem metadata from https://rubygems.org/.........
Fetching json 2.6.3
Installing json 2.6.3 with native extensions
Bundle complete! 2 Gemfile dependencies, 14 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
```

10a9588c6d
2023-12-14 20:22:48 +08:00
David Rodríguez
d718654bb1
[rubygems/rubygems] Remove extension building sync stuff no longer present in RubyGems
59a85388b9
2023-12-14 20:22:48 +08:00
David Rodríguez
41095f4de0
[rubygems/rubygems] RubyGems > 3.2.0.rc.1 is now always provided
929b521f3a
2023-12-14 20:22:48 +08:00
David Rodríguez
778438d423
[rubygems/rubygems] Gem::Specification always has default_stubs now
30db1eb4a5
2023-12-14 20:22:48 +08:00
David Rodríguez
5cf6f7f885
[rubygems/rubygems] Remove more methods now defined in all RubyGems versions
e015200ffa
2023-12-14 20:22:48 +08:00
David Rodríguez
7564038864
[rubygems/rubygems] Remove check only necessary for ancient RubyGems
ffa2f03489
2023-12-14 20:22:48 +08:00
David Rodríguez
04dd2a8aae
[rubygems/rubygems] This patch should be no longer needed
1139e90931
2023-12-14 20:22:48 +08:00
David Rodríguez
b45c1523a8
[rubygems/rubygems] Gem::Specification.find_all_by_name is always defined now
1d61c7686b
2023-12-14 20:22:48 +08:00
David Rodríguez
b300f5a0e1
[rubygems/rubygems] Revert "Improve default gem handling"
This reverts commit 091b4fcf2b.

dcade3235f
2023-12-14 20:22:48 +08:00
Drew Stevenson
beefce1444 [rubygems/rubygems] Warn for duplicate meta data links
Match order of METADATA_LINK_KEYS to order used by rubygems.org in Links model.
Add missing download_uri key.

d2922cd6e9
2023-12-14 00:06:05 +00:00
Martin Emde
c1f4bfd41f [rubygems/rubygems] Revert "Merge pull request #7167 from nevinera/add-json-output-option-to-bundle-outdated"
This reverts commit a4ac5116b8, reversing
changes made to 8a6b180d0a.

a1efe4015d
2023-12-13 22:50:45 +00:00
Hiroshi SHIBATA
5a0cbc9344 Detect bootsnap from all frames 2023-12-14 07:48:08 +09:00