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

2535 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 5568cd5a55
Fix a missing comma 2022-03-28 17:02:02 +09:00
Nobuyoshi Nakada 152bb3c0b4
Use m4 comments outside macros in m4 files 2022-03-28 17:01:28 +09:00
Nobuyoshi Nakada 2cb3efffcf
Extract RUBY_REQUIRE_FUNCS 2022-03-28 16:56:15 +09:00
Nobuyoshi Nakada 69967ee64e
Revert "Finer-grained inline constant cache invalidation"
This reverts commits for [Feature #18589]:
* 8008fb7352
  "Update formatting per feedback"
* 8f6eaca2e1
  "Delete ID from constant cache table if it becomes empty on ISEQ free"
* 629908586b
  "Finer-grained inline constant cache invalidation"

MSWin builds on AppVeyor have been crashing since the merger.
2022-03-25 20:29:09 +09:00
Kevin Newton 629908586b Finer-grained inline constant cache invalidation
Current behavior - caches depend on a global counter. All constant mutations cause caches to be invalidated.

```ruby
class A
  B = 1
end

def foo
  A::B # inline cache depends on global counter
end

foo # populate inline cache
foo # hit inline cache

C = 1 # global counter increments, all caches are invalidated

foo # misses inline cache due to `C = 1`
```

Proposed behavior - caches depend on name components. Only constant mutations with corresponding names will invalidate the cache.

```ruby
class A
  B = 1
end

def foo
  A::B # inline cache depends constants named "A" and "B"
end

foo # populate inline cache
foo # hit inline cache

C = 1 # caches that depend on the name "C" are invalidated

foo # hits inline cache because IC only depends on "A" and "B"
```

Examples of breaking the new cache:

```ruby
module C
  # Breaks `foo` cache because "A" constant is set and the cache in foo depends
  # on "A" and "B"
  class A; end
end

B = 1
```

We expect the new cache scheme to be invalidated less often because names aren't frequently reused. With the cache being invalidated less, we can rely on its stability more to keep our constant references fast and reduce the need to throw away generated code in YJIT.
2022-03-24 09:14:38 -07:00
Peter Zhu 5f10bd634f Add ISEQ_BODY macro
Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using
this macro will make it easier for us to change the allocation strategy
of rb_iseq_constant_body when using Variable Width Allocation.
2022-03-24 10:03:51 -04:00
Nobuyoshi Nakada 1bb9e42fa5 extlibs.rb: Add fallback `Colorize`
To get rid of an unnecessary dependency for the case using
in other repositories.
2022-03-24 13:16:13 +09:00
Nobuyoshi Nakada 9ed6875f93 extlibs.rb: Enclose `Vars` in `ExtLibs` class
To get rid of an unnecessary top-level constant for the case using
as a library.
2022-03-24 13:16:13 +09:00
Nobuyoshi Nakada 247f8ecfa4 extlibs.rb: Extract ExtLibs#process
For the case using this script as a library.
- `ExtLibs#process` reads and processes an extlibs file.
- `ExtLibs#process_under` processes all extlibs files under the
  given directory.
- `Extlibs.run` parses `ARGV` and lets an instance process the
  directories.
2022-03-24 13:16:13 +09:00
Hiroshi SHIBATA 0024a76ea0
Ignore pre-release for sync target on sync_default_gems 2022-03-10 13:35:21 +09:00
Hiroshi SHIBATA 1adc7aa630
Added release option to sync only released version of the default gems 2022-03-08 21:08:46 +09:00
Hiroshi SHIBATA ff3d7b720e Merge RubyGems and Bundler master 2022-02-28 11:39:20 +09:00
Nobuyoshi Nakada 7f4345639b
fake.rb: Set prefix to `$topdir`
Not to refer outside the top build directory from rbconfig.
2022-02-27 21:58:59 +09:00
Nobuyoshi Nakada 8780f15fd7 [ruby/date] Use `assert_deprecated_warn`
https://github.com/ruby/date/commit/c55004715a
2022-02-25 20:39:47 +09:00
Peter Zhu 9bd4b2ab14 Add ABI version to RUBY_LIB_VERSION
This commit adds the ABI version as build metadata to
RUBY_LIB_VERSION. This will ensure that gems are installed in a path
with the ABI version.
2022-02-24 09:18:01 -05:00
Peter Zhu 3df16924b4 [Feature #18249] Implement ABI checking
Header file include/ruby/internal/abi.h contains RUBY_ABI_VERSION which
is the ABI version. This value should be bumped whenever an ABI
incompatible change is introduced.

When loading dynamic libraries, Ruby will compare its own
`ruby_abi_version` and the `ruby_abi_version` of the loaded library. If
these two values don't match it will raise a `LoadError`. This feature
can also be turned off by setting the environment variable
`RUBY_RUBY_ABI_CHECK=0`.

This feature will prevent cases where previously installed native gems
fail in unexpected ways due to incompatibility of changes in header
files. This will force the developer to recompile their gems to use the
same header files as the built Ruby.

In Ruby, the ABI version is exposed through
`RbConfig::CONFIG["ruby_abi_version"]`.
2022-02-22 09:55:21 -05:00
Nobuyoshi Nakada 2ae35ad766 RUBY_REPLACE_TYPE: check if the target type is a pointer 2022-02-19 15:33:15 +09:00
NARUSE, Yui 542a38f619 gen-mail.rb: support markdown file path 2022-02-18 21:44:22 +09:00
Koichi Sasada 00c7a0d491 fix parallel test timeout retrying
On the parallel test, workers can be killed because of timeout
and the information for the retrying can be inconsistent.
This patch will skip if the inconsistency is found and report
as an error.

http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3834082
2022-02-16 17:57:04 +09:00
Jemma Issroff 2913a2f5cf Treat TS_ICVARC cache as separate from TS_IVC cache 2022-02-02 09:20:34 -08:00
David Rodríguez 517d7c3221 Sync latest Bundler & RubyGems 2022-02-01 08:09:23 +09:00
Jesse Chavez 99d02caed3 [ruby/logger] Fix log rotation inter-process lock failed.
Issue only occurs in JRuby 9.3.0.0 and Windows and the full
console output is:

log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process.
log writing failed. closed stream
log writing failed. closed stream
...

https://github.com/ruby/logger/commit/19fc734638
2022-01-27 12:33:06 +09:00
Koichi Sasada cac6fe9023 add `--stderr-on-failure` option to test-all
Now all failure messages are printed to stdout. This option
makes all failure messages printed into stderr.
2022-01-26 09:56:09 +09:00
David Rodríguez de678cd51e
[ruby/pathname] Officially drop support for ruby 2.6 or older
The gem doesn't even install on old rubies, but since the gemspec claims
it's supported, `gem install pathname` will try to install it and print
an error.

This commit doesn't fix the above issue. The only way to fix it would be
to restore support and release a new version that actually supports old
rubies. However, such a change has been proposed and ignored for a long
time.

So this issue proposes to leave that broken but at least bring the
gemspec manifest and the CI matrix in sync to hopefully avoid this issue
from happening again in the future.

https://github.com/ruby/pathname/commit/3ee010b538
2022-01-25 08:50:31 +09:00
Nobuyoshi Nakada 355bc37196
Reuse the default `AC_LANG_PROGRAM(C)` definition 2022-01-23 01:02:11 +09:00
Nobuyoshi Nakada ad150a1459
Override `AC_C_PROGRAM` on old autoconf
Autoconf 2.69 fails to detect `-Werror=old-style-definition` due
to the old style definition of `main`.
2022-01-22 20:13:46 +09:00
Koichi Sasada 374904b25f remain `RUBY_ON_BUG` for child processes.
`RUBY_ON_BUG` is useful for child processes created by the test
process.
2022-01-19 23:17:14 +09:00
Hiroshi SHIBATA d22511fd75 Merge rubygems/rubygems HEAD.
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
2022-01-19 15:01:44 +09:00
Yuta Saito 420622b5a7 [wasm] add no thread variant for freestanding environment
This implementation does nothing around preemptive context switching
because there is no native thread.
2022-01-19 11:19:06 +09:00
Yuta Saito 65f95f26ff [wasm] add asyncify based setjmp, fiber, register scan emulation
configure.ac: setup build tools and register objects

main.c: wrap main with rb_wasm_rt_start to handle asyncify unwinds

tool/m4/ruby_wasm_tools.m4: setup default command based on WASI_SDK_PATH
environment variable. checks wasm-opt which is used for asyncify.

tool/wasm-clangw wasm/wasm-opt: a clang wrapper which replaces real
wasm-opt with do-nothing wasm-opt to avoid misoptimization before
asyncify. asyncify is performed at POSTLINK, but clang linker driver
tries to run optimization by wasm-opt unconditionally. inlining pass
at wasm level breaks asyncify's assumption, so should not optimize
before POSTLIK.

wasm/GNUmakefile.in: wasm specific rules to compile objects
2022-01-19 11:19:06 +09:00
Hiroshi SHIBATA 3515867381 Removed skip alias in test suite 2022-01-17 10:39:24 +09:00
Nobuyoshi Nakada 56b45e8c8e Let testunit use omit or pend instead of skip 2022-01-16 21:35:09 +09:00
Nobuyoshi Nakada d3940a533d
Fetch the unmerged revision to test of bundled gems 2022-01-14 14:54:29 +09:00
Yuta Saito e554b17c60 tool/rbinstall.rb: instal ruby.wasm produced by Emscripten 2022-01-06 18:14:24 +09:00
Hiroshi SHIBATA d6311cb1ca Track RubyGems 3.4.0dev and Bundler 2.4.0dev 2021-12-27 10:45:36 +09:00
NARUSE, Yui da4d6dc1ec tag's prefix is "v" 2021-12-25 22:19:02 +09:00
NARUSE, Yui 8325094177 Revert "Do not include external library sources into packages"
This reverts commit a042043487.
2021-12-25 21:22:02 +09:00
NARUSE, Yui 1cc02078e5 Revert "make-snapshot: add -extlibs option"
This reverts commit afa9d65d61.
It prevents installing libffi.
2021-12-25 21:01:37 +09:00
NARUSE, Yui 05faa36028 fix tool/format-release
Pass ruby directory path
2021-12-25 20:57:11 +09:00
Hiroshi SHIBATA da6a5e3ed1 Merge RubyGems-3.3.3 and Bundler-2.3.3 2021-12-25 07:40:52 +09:00
Nobuyoshi Nakada 083cf6a577
sync_default_gems.rb: Expand GH-xxxx style GitHub links [ci skip] 2021-12-24 14:34:14 +09:00
Nobuyoshi Nakada 097c4a2adf
sync_default_gems.rb: GitHub links at word boundary only [ci skip] 2021-12-24 14:27:03 +09:00
Hiroshi SHIBATA b0ad6cb371 Merge RubyGems-3.3.2 and Bundler-2.3.2 2021-12-24 10:35:31 +09:00
Hiroshi SHIBATA fb1ab27f53 Merge RubyGems-3.3.1 and Bundler-2.3.1 2021-12-23 09:44:45 +09:00
Hiroshi SHIBATA 69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00
Yuta Saito 3c7e95966d rbinstall.rb: install ext only when it's configured [Bug #18414] 2021-12-21 15:14:54 +09:00
Nobuyoshi Nakada c57ac4c6e0 Fix location of extensions in bundled gems when static-linked-ext
Install bundled gem extension files to the gem extension directory
under DESTDIR, when static-linked-ext as well as non-static case.
2021-12-21 02:01:57 +09:00
Yuta Saito f1a02ebfb9 Install gemspec even though no .rb and no .so
When building with --with-static-linked-ext, some exts without rb file
doesn't produce neither .so or .rb under .ext/common. Therefore, change
rbinstall.rb to install gemspec even if there is no .so or .rb for that
case.
2021-12-16 16:17:41 +09:00
Hiroshi SHIBATA 7e084ed707 Merge RubyGems and Bundler master
Merge from 793ad95ecb
2021-12-15 18:05:18 +09:00
Takashi Kokubun 1a63468831
Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00