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

3421 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada d940e3b2c3 `cexpr!` must be up to one per line now 2024-01-22 19:39:34 +09:00
Nobuyoshi Nakada 127b19ab56 Use line numbers as builtin-index
The order of iseq may differ from the order of tokens, typically
`while`/`until` conditions are put after the body.

These orders can match by using line numbers as builtin-indexes, but
at the same time, it introduces the restriction that multiple `cexpr!`
and `cstmt!` cannot appear in the same line.

Another possible idea is to use `RubyVM::AbstractSyntaxTree` and
`node_id` instead of ripper, with making BASERUBY 3.1 or later.
2024-01-22 19:39:34 +09:00
Hiroshi SHIBATA 754e4e0c9c Stop sync csv repo 2024-01-22 18:23:05 +09:00
Hiroshi SHIBATA f869f2ecf1 Stop sync nkf repo 2024-01-22 14:17:52 +09:00
Hiroshi SHIBATA c44d15c639
Stop sync drb repo 2024-01-22 12:35:04 +09:00
Kevin Newton 99d6e2f1ee [PRISM] Revisit target nodes 2024-01-19 20:12:07 -05:00
eileencodes ed50161bd6 [PRISM] Fix ensure code running twice
Fixes: ruby/prism#2212
2024-01-19 13:04:01 -08:00
Hiroshi SHIBATA fa5094e183 Stop sync rinda repo 2024-01-19 20:02:19 +09:00
Hiroshi SHIBATA 31a5d4a0cd Skip test task for resolv-replace 2024-01-19 17:44:58 +09:00
Hiroshi SHIBATA 36095ed3db Removed sync task for resolv-replace 2024-01-19 17:44:58 +09:00
Hiroshi SHIBATA 11ec59c92b Removed sync task for abbrev 2024-01-19 16:27:45 +09:00
Hiroshi SHIBATA d3898e9752
Removed sync task for observer 2024-01-19 15:56:55 +09:00
David Rodríguez a8fa28ab80
Bump uri version used in development 2024-01-19 11:29:55 +09:00
Nobuyoshi Nakada 97721fa4e1
Old sh does not allow `:` in function names [ci skip] 2024-01-18 19:56:52 +09:00
Nobuyoshi Nakada 264b7363aa
Preserve spaces in messages [ci skip] 2024-01-18 18:09:42 +09:00
Nobuyoshi Nakada a3e6546e7e
Print error messages to the stderr [ci skip] 2024-01-18 16:36:09 +09:00
Kazuhiro NISHIYAMA 8370b3bc32
Add baseruby version message
Because `--with-baseruby=/usr/bin/ruby` on macOS is Ruby 2.6,
I was confused why `--with-baseruby` was ignored.
2024-01-18 08:40:16 +09:00
Hiroshi SHIBATA 4dde4d1437 Stop sync commits from bigdecimal repo 2024-01-18 07:44:13 +09:00
Kevin Newton b0a32b7249 [PRISM] Enable more btests 2024-01-17 15:04:01 -05:00
Nobuyoshi Nakada c68ce6f7f5
Skip checking for symbol leaks in libruby.so linking extensions
The libruby.so linking extension libraries contain symbols exported
from extension libraries, and is not subject of test-leaked-globals.
2024-01-17 19:37:56 +09:00
Takashi Kokubun e37a37e696 Drop obsoleted BUILTIN_ATTR_NO_GC attribute
The thing that has used this in the past was very buggy, and we've never
revisied it. Let's remove it until we need it again.
2024-01-16 17:27:53 -08:00
Hiroshi SHIBATA 6c016a4197 Inject base64 for basic auth examples of bundler 2024-01-17 08:28:31 +09:00
Hiroshi SHIBATA 42aa24a24c No longer needed to sync base64 2024-01-17 08:28:31 +09:00
Hiroshi SHIBATA 3f5016178c We don't need to sync getoptlong 2024-01-16 17:07:10 +09:00
Hiroshi SHIBATA c5d54e1db1
We don't need to sync mutex_m 2024-01-16 16:29:16 +09:00
yui-knk b92c8934a2 Lrama v0.6.1 2024-01-13 20:03:54 +09:00
Aaron Patterson 475663f039 Only intern constants upon compilation entry
Before this commit the Prism compiler would try to intern constants
every time it re-entered. This pool of constants is "constant" (there is
only one pool per parser instance), so we should do it only once: upon
the top level entry to the compiler.

This change does just that: it populates the interned constants once.

Fixes: https://github.com/ruby/prism/issues/2152
2024-01-12 14:53:14 -08:00
Aaron Patterson 2c27a3a0dd Fix splat assigns with no lefties
We still need to emit an expand array even if there's no "left side"
variables

Fixes: https://github.com/ruby/prism/issues/2153
2024-01-12 12:46:28 -08:00
Hiroshi SHIBATA 51ba654939
Set prerelease flag if tag includes preview or rc 2024-01-12 15:36:08 +09:00
Hiroshi SHIBATA 6a45320c25
Truncate only prefix. Don't remove v from like preview1 2024-01-12 14:56:04 +09:00
John Hawthorn 18573b8d05 Avoid reading unused lvars in Primitive.cexpr
Previously on builds with optimizations disabled, this could result in
an out of bounds read. When we had all of:
* built with -O0
* Leaf builtin
* Primitive.mandatory_only
* "no args builtin", called by vm_call_single_noarg_inline_builti
* The stack is escaped to the heap via binding or a proc

This is because mk_builtin_loader generated reads for all locals
regardless of whether they were used and in the case we generated a
mandatory_only iseq that would include more variables than were actually
available.

On optimized builds, the invalid accesses would be optimized away, and
this also was often unnoticed as the invalid access would just hit
another part of the stack unless it had been escaped to the heap.

The fix here is imperfect, as this could have false positives, but since
Primitive.cexpr! is only available within the cruby codebase itself
that's probably fine as a proper fix would be much more challenging (the
only false positives we found were in rjit.rb).

Fixes [Bug #20178]

Co-authored-by: Adam Hess <HParker@github.com>
2024-01-11 16:53:20 -08:00
Hiroshi SHIBATA b10aa7757e
Disable to add latest label when running with --no-dry-run option 2024-01-11 17:36:51 +09:00
Kevin Newton 5906f6a50e Add a GitHub workflow for prism btests 2024-01-10 15:36:19 -05:00
Hiroshi SHIBATA 3ecfea6075
Need newline after changes list 2024-01-10 13:43:04 +09:00
Nobuyoshi Nakada 7285b165a4 outdate-bundled-gems.rb: Make platform and version options optional 2024-01-09 16:42:20 +09:00
Nobuyoshi Nakada 1288e7e962 outdate-bundled-gems.rb: Remove timestamp files for revisions to test 2024-01-09 16:42:20 +09:00
Nobuyoshi Nakada 60cd5230f6 outdate-bundled-gems.rb: Sort outputs in depth order 2024-01-09 16:42:20 +09:00
Nobuyoshi Nakada 72a78ecd33 outdate-bundled-gems.rb: Add `--all` option
Unless this option is given, keep other gems that may be used by
`test-bundled-gems`.
2024-01-09 16:42:20 +09:00
Nobuyoshi Nakada bf108636df outdate-bundled-gems.rb: Add `--only={all,curdir,srcdir}` option 2024-01-09 16:42:20 +09:00
Nobuyoshi Nakada 963131a2d9 outdate-bundled-gems.rb: Pass platform and version explicitly
For different version baseruby, use the target platform and version
instead of the info of baseruby.
2024-01-09 16:42:20 +09:00
Nobuyoshi Nakada 8f61617a95 outdate-bundled-gems.rb: Do not clean the same directory twice 2024-01-09 16:42:20 +09:00
yui-knk db476cc71c Introduce NODE_SYM to manage symbol literal
`:sym` was managed by `NODE_LIT` with `Symbol` object.
This commit introduces `NODE_SYM` so that

1. Symbol literal is detectable from AST Node
2. Reduce dependency on ruby object
2024-01-09 16:07:19 +09:00
Hiroshi SHIBATA f82a6172a2
Avoid the duplicated entries of GitHub releases 2024-01-09 14:53:22 +09:00
S-H-GAMELINKS e4a9a73931 Skip some RBS test 2024-01-07 09:24:34 +09:00
Nobuyoshi Nakada 9b78ef7552 [DOC] Load options and parse files from srcdir
RDoc options that do not change and can be written in `.rdoc_options`
file are moved, so that they match when called without `make`.

Get rid of parsing the files in `page_dir` twice (as relative paths
and absolute paths).
2024-01-06 21:19:51 +09:00
Hiroshi SHIBATA 900fb48e68
Support Feature and Bug tickets for release note generator 2024-01-05 18:29:02 +09:00
Luke Gruber e12d4c654e Don't create T_MATCH object if /regexp/.match(string) doesn't match
Fixes [Bug #20104]
2024-01-01 13:28:26 -08:00
Nobuyoshi Nakada 67026af146
Exclude [ci skip] commits from ChangeLog 2023-12-28 15:01:25 +09:00
Nobuyoshi Nakada 606f7540ee
Exclude dependabot from ChangeLog [ci skip] 2023-12-28 15:01:24 +09:00
Nobuyoshi Nakada 2a4a84664a [Bug #20088] Fix ARCH_FLAG for cross compiling 2023-12-27 19:11:54 +09:00
KJ Tsanaktsidis 3d24254b55 Make sync script work correctly with Windows-style newlines
I'm almost certain nobody is actually running this script on Windows,
but the tests for it do run during `nmake check`, and they fail at least
on my git configuration.

The $ anchor doesn't match \r\n with git's -E regex matching, so we need
to add \r? to gobble the carriage-return up too if needed.
2023-12-27 14:11:59 +11:00
KJ Tsanaktsidis dc532b7c4e Fix WEBrick::TestFileHandler#test_short_filename test not working
The test is currently skipped and can't possibly work on windows at the
moment. It fails because $LOAD_PATH is not set up properly in the forked
CGI process, so `require 'uri'` fails.

This works properly in the test_cgi.rb tests, because it sets up a
:RequestCallback to fix things up. Let's move the setup there into
util.rb, so it can be shared with test_filehandler.rb as well.
2023-12-27 12:54:25 +11:00
Hiroshi SHIBATA 99f8bb1331
Fetch tags with test-bundled-gems
make test-bundled-gems failed when default branch didn't have tag ref at target repository.

  ```
  updating rbs ...
  From ssh://github.com/ruby/rbs
   - [deleted]           (none)                             -> origin/dependabot/bundler/steep/rbs-3.4.0
  remote: Enumerating objects: 68, done.
  remote: Counting objects: 100% (68/68), done.
  remote: Compressing objects: 100% (43/43), done.
  remote: Total 68 (delta 19), reused 61 (delta 18), pack-reused 0
  Unpacking objects: 100% (68/68), 204.84 KiB | 633.00 KiB/s, done.
   * [new branch]        aaa-3.4.x                          -> origin/aaa-3.4.x
   * [new branch]        dependabot/bundler/steep/rbs-3.4.1 -> origin/dependabot/bundler/steep/rbs-3.4.1
     01371463..fea0932b  master                             -> origin/master
  checking out v3.4.1 (v=3.4.1, r=) ...
  fatal: invalid reference: v3.4.1
  fatal: invalid reference: 3.4.1
  make: *** [uncommon.mk:1553: yes-test-bundled-gems-fetch] Error 1
  ```
2023-12-27 10:30:38 +09:00
Sorah Fukumori fac2536776
Test_SyncDefaultGems: Fail when editor run (#9365)
When something went wrong and git launches editor, and a editor chosen
was terminal-based, a test run unnoticeably hangs.

As we intend editors not to be ran with --no-edit, GIT_EDITOR should be
defaulted to `false` so let Git command fails when it attempts to start a
editor. This allows catching such unintentional behaviour in test suite.

(Note: Prior to Git v2.32.0, git cherry-pick --no-edit doesn't work for
conflict resolution so currently the test hangs when older Git is in use.
39edfd5cbc
i.e. Ubuntu 20.04, Debian Bullseye doesn't satisfy this prerequisite.)
2023-12-26 21:43:23 +00:00
yui-knk 12b69bf515 Lrama v0.6.0 2023-12-25 20:33:22 +09:00
Hiroshi SHIBATA 27ead9907d
Typofix under lib and test, tool directories 2023-12-25 11:32:42 +09:00
Takashi Kokubun c25705c267 Get rid of obsoleted RJITFirst
It was renamed from test_mjit, but we did not maintain it as test_rjit.
We test RJIT very differently.
2023-12-22 20:20:42 -08:00
Takashi Kokubun 19d082dcfa RJIT: Distinguish Pointer with Array
This is more convenient for accessing those fields.
2023-12-22 11:24:04 -08:00
Jeremy Evans 7dca6b53a9
Add tool/missing-baseruby.bat, used when BASERUBY not available
Previously, the embedded semicolon in BASERUBY if BASERUBY is
not available breaks tarball builds without BASERUBY when using
OpenBSD make, due to the inability to escape MFLAGS correctly.
This moves the same BASERUBY code into a separate file, avoiding
the MFLAGS quoting issue.

BASERUBY must be passed to build-ext because it is required
by ripper since the introduction of lrama.

Fixes [Bug #19683]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-19 21:30:47 -08:00
Peter Zhu 32ecda354f Support `GC.auto_compact = :empty` on debug builds
This commit adds `GC.auto_compact = :empty` which will run
auto-compaction sorting pages by empty slots so the most amount of
objects will be moved. This will make it easier to write tests for
auto-compaction.
2023-12-19 18:29:36 -05:00
Takashi Kokubun eb872d1752 RJIT: Share rb_vm_insns_count for vm_insns_count 2023-12-18 23:55:40 -08:00
Hiroshi SHIBATA ad2a38dce4
Added simple test script 2023-12-16 16:36:47 +08:00
Hiroshi SHIBATA 6f6b36b7e4
Added test for sub-feature like bigdecimal/util 2023-12-16 15:44:34 +08:00
Hiroshi SHIBATA dd49ee152b
Use minimum arguments for Bootsnap 2023-12-16 14:41:43 +08:00
David Rodríguez d5af5a48a5
Fix Sinatra warning during specs
Some specs now print the following warning:

```
/path/to/bundler/tmp/1/gems/base/ruby/3.2.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:902: warning: constant Tilt::Cache is deprecated
```

Updating sinatra to latest & greatest fixes it.

Update other deps too since at it.
2023-12-16 10:09:50 +08: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

https://github.com/rubygems/rubygems/commit/7c425d49dd
2023-12-15 14:48:25 +00:00
Nobuyoshi Nakada 7cbc08b388 Follow removed conflict files
After editing a conflict, continue without removed files.
2023-12-15 22:37:38 +09:00
Nobuyoshi Nakada 4d5bfa7c3b
Ignore the spcial case of target_cpu
On Windows, x86_64 is called as x64.
2023-12-15 15:39:14 +09:00
Nobuyoshi Nakada 2c2c6bc3fa
Fix `ARCH_FLAG` when cross-compiling on macOS 2023-12-15 15:19:16 +09:00
Nobuyoshi Nakada 1e5c4026d5
Fix `ARCH_FLAG` when `--with-arch` with single CPU 2023-12-15 14:10:02 +09:00
Hiroshi SHIBATA cc9aeec23e
Explained about test_for_warn_bundled_gems 2023-12-15 14:14:48 +08:00
git 202c608248 * append newline at EOF. [ci skip] 2023-12-15 06:05:41 +00:00
Hiroshi SHIBATA 8df46d54bf
Added test case of dash gem like net-smtp 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 9a204fb82e
Added test case of bootsnap 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 25a133ba17
Added test case of bundle exec 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 66b82a4430
Added test case of bundled gems dependencies 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 76c1ce4e37
Added basic test case of bundled gems warning 2023-12-15 14:05:13 +08:00
Jeremy Evans c42e4a38e9 Fix tool/ln_sr.rb passing 2 arguments to String#chomp!
I'm guessing String#sub! was desired here.
2023-12-13 07:05:21 -08:00
David Rodríguez 6b3c9cebe9 Normalize bundler bindir
This makes bundler consistent with all other gems, and makes the default
installation of Bundler in the release package look like any other
bundler installation.

Before (on preview3, for example), Bundler executable is installed at:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle

Now it's installed in the standard location:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle
2023-12-13 12:59:23 +09:00
David Rodríguez 1572322e17
Sync with upstream rubygems (#9206) 2023-12-12 11:49:25 -08:00
Takashi Kokubun fd7decbf04 Allow syncing tool/bundler 2023-12-12 11:19:02 -08:00
NARUSE, Yui 6b3abcf462 fix regexp pattern of diff 2023-12-12 11:22:40 +09:00
David Rodríguez 8c2480c9ed
Unlock tilt since we no longer support Ruby 2.6 2023-12-12 10:04:57 +09:00
Kazuhiro NISHIYAMA 9765ada69c Fix NoMethodError on fail
```
.../tool/lib/colorize.rb:56:in `resolve_color': undefined method `gsub' for an instance of Symbol (NoMethodError)

    color.gsub(/\b[a-z][\w ]+/) do |n|
	 ^^^^^
	from .../tool/lib/colorize.rb:47:in `decorate'
	from .../tool/lib/test/unit.rb:1012:in `block in failed'
```
2023-12-12 09:14:11 +09:00
Nobuyoshi Nakada d9dbcd848f
Add bright colors and multiple attributes [ci skip]
Not only:
```
$ ruby colorize.rb fail foo
```

Also:
```
$ ruby colorize.rb 'bright_blue;bold' foo
```
2023-12-10 20:43:47 +09:00
Nobuyoshi Nakada 0096d6a809
Extract configuration and lookup methods [ci skip] 2023-12-10 20:43:44 +09:00
Hiroshi SHIBATA f2c84c4884 Pick commit from https://github.com/rubygems/rubygems/pull/7085
Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2023-12-08 16:01:01 +09:00
Hiroshi SHIBATA dab30b4d71 Pick commit from https://github.com/rubygems/rubygems/pull/7227
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-12-08 16:01:01 +09:00
yui-knk 071df40495 Lrama v0.5.12 2023-12-07 21:07:38 +09:00
Hiroshi SHIBATA 440ea778f2
VERSION file of JSON is removed from upstream 2023-12-05 14:27:19 +09:00
yui-knk 9f6c6f88c3 Lrama v0.5.11 2023-12-02 08:58:32 +09:00
Peter Zhu 128837e4a2 Support RUNRUBY_USE_RR for rr debugger 2023-11-29 17:54:58 -05:00
Peter Zhu aee275165b debugger can never be nil 2023-11-29 17:54:58 -05:00
Peter Zhu 150ed44d87 Fix compaction during ary_make_partial
The ary_make_shared call may allocate, which can trigger a GC
compaction. This can cause the array to be embedded because it has a
length of 0.
2023-11-27 12:40:26 -05:00
Soutaro Matsumoto 1886ee190a
Bundle rbs-3.3.1 (#8921)
* bundle rbs-3.3.1
* Restore diff/subtract tests
2023-11-21 09:21:24 +00:00
Kevin Newton 323bec6295 RubyVM::InstructionSequence.compile_file_prism
* Provide a new API compile_file_prism which mirrors compile_file
but uses prism to parse/compile.
* Provide the ability to run test-all with RUBY_ISEQ_DUMP_DEBUG set
to "prism". If it is, we'll use the new compile_file_prism API to
load iseqs during the test run.
2023-11-20 12:45:29 -08:00
yui-knk c56dd94db0 Lrama v0.5.10 2023-11-18 19:38:55 +09:00
Yusuke Endoh 5bf75c20a2 Refactor the settings of test-all out
test/runner.rb and tool/lib/test/unit/parallel.rb must use the same
settings. However, some settings were copied and pasted, while some were
added only to test/runner.rb.
This changeset creates tool/test/init.rb for all settings of test-unit,
which is loaded not only by test/runner.rb but also
tool/lib/test/unit/parallel.rb.

Background: the GEM_HOME environment variable was removed in
test/runner.rb, which prohibit `require "rake"` (note that rake is a
bundled gem). However the parallel mode didn't refrect this setting,
i.e., `require "rake"` was allowed.
This leads to an inconsistency, which actually affected a test test
defines s test class *only when* `require "rake"` is successful.
(test/rubygems/test_gem_package_task.rb)

https://github.com/ruby/ruby/actions/runs/6807729617/job/18511055636#step:8:1714
```
  /home/runner/work/ruby/ruby/src/tool/lib/test/unit.rb:729:in `const_get': uninitialized constant TestGemPackageTask (NameError)

                suites.map! {|r| ::Object.const_get(r[:testcase])}
                                         ^^^^^^^^^^
```
2023-11-15 19:27:10 +09:00
Soutaro Matsumoto 6fb030e6f1 Skip TOPDIR test 2023-11-14 22:08:32 +09:00
Hiroshi SHIBATA e6b2cd15e3
Skip test_diff_* from rbs tests. It used bundle command 2023-11-14 20:35:56 +09:00
Peter Zhu 68869e9bd9 Revert "Revert "Remove SHAPE_CAPACITY_CHANGE shapes""
This reverts commit 5f3fb4f4e3.
2023-11-13 18:26:36 -05:00
Sorah Fukumori 952de171c0 make-snapshot: update RUBY_PATCHLEVEL_STR regexp
the regexp to replace RUBY_PATCHLEVEL_STR for prerelease snapshots doesn't
match since GH-8578.

follow-up: https://github.com/ruby/ruby/pull/8578
follow-up: 68df43788d
2023-11-13 11:28:48 +09:00
Peter Zhu 5f3fb4f4e3 Revert "Remove SHAPE_CAPACITY_CHANGE shapes"
This reverts commit f6910a6112.

We're seeing crashes in the test suite of Shopify's core monolith after
this change.
2023-11-10 11:27:49 -05:00
Peter Zhu f6910a6112 Remove SHAPE_CAPACITY_CHANGE shapes
We don't need to create a shape to transition capacity as we can
transition the capacity when the capacity of the SHAPE_IVAR changes.
2023-11-09 09:25:02 -05:00
Nobuyoshi Nakada f2d6b41c8e
Ignore warnings about currently unsupported .debug_macinfo 2023-11-07 23:19:51 +09:00
Nobuyoshi Nakada f8456b650b
Ignore duplicate libraries warnings from gcc 13 2023-11-07 23:19:50 +09:00
Nobuyoshi Nakada 304194d73e Remove files which are newly added but to be ignored 2023-11-07 10:45:02 +09:00
yui-knk a15aa259db Lrama v0.5.9 2023-11-05 12:04:52 +09:00
Nobuyoshi Nakada 6b2a3c84a5
Update newer version gems only 2023-11-04 11:29:42 +09:00
Peter Zhu 38ba040d8b Make every initial size pool shape a root shape
This commit makes every initial size pool shape a root shape and assigns
it a capacity of 0.
2023-11-02 13:42:11 -04:00
Kevin Newton a7a70bce82
rm prism type templates 2023-10-30 12:27:03 -04:00
Nobuyoshi Nakada 6589af52d2
Print the date to STDERR if STDIN is a part of input [ci skip] 2023-10-28 14:12:10 +09:00
Jun Aruga a0b7574e59 .travis.yml: Simplify Travis CI.
* Remove CI functions for make test-all.
  I want to simplify the `.travis.yml` for us to maintain it easily. When we
  need to skip a test, we can fix the test file directly.
  I removed the `tool/ci_functions.sh` too. I confirmed the file is not used in
  any other files.
* .travis.yml: Remove a notification for IRC channel.
  GitHub Actions don't use this notification. The setting is outdated.
* Fix to skip the commit including the document keyword.
  There were 2 `if` syntax lines in the file.
* Remove ccache.
2023-10-27 19:16:13 +02:00
Nobuyoshi Nakada 934beac118
Select the destination for the latest date by whether inplace mode 2023-10-27 16:57:21 +09:00
Kevin Newton 3ed317a441
Remove JavaScript templates 2023-10-26 09:50:40 -04:00
yui-knk 7d159a8787 Lrama v0.5.8 2023-10-26 17:15:38 +09:00
Hiroshi SHIBATA 634e0ac140 Fix test failure with __runner_options__ renaming 2023-10-26 12:39:13 +09:00
lukeg 7717684d16 tool test/unit/testcase: rename vars @passed, @@current
to @__passed__, @@__current__.
@passed is redefined in a few test suites, and this could lead to bugs.

Also rename @options (Runner#options) to @__runner_options__, which is
only used in make test-tool anyway.
2023-10-26 12:39:13 +09:00
Kazuhiro NISHIYAMA a6a67b0524
Do not append latest_date to gems/bundled_gems [ci skip] 2023-10-25 13:10:28 +09:00
Nobuyoshi Nakada c86c6a84f5 [Bug #19968] Revert RBS revision to test
This reverts the commits for the master branch of RBS:

- commit f717faac632dd8664d0967f8e639b84d5d032854: "Update rbs
  revision to test"

    The target revision to test is in master branch, not for 3.2.x.

- commit 9e93af5329f35092c3de3ea37d4e9e181b800bb2: "Skip RBS
  `RbConfig::TOPDIR` test that is `nil` before installation"

    RbConfig_test.rb is not updated in 3.2.x branch.
2023-10-24 22:59:09 +09:00
Nobuyoshi Nakada bf93ceb26b
Set date in message to the latest gem date [ci skip] 2023-10-23 23:13:55 +09:00
Hiroshi SHIBATA df5bf5bb59
Removed unnecessary libraries of sync_tool 2023-10-23 17:28:50 +09:00
Hiroshi SHIBATA 9844371c6f
sync_tool is unnecessary now.
We can use https://github.com/ruby/test-unit-ruby-core for testing the default gems.
2023-10-23 17:22:27 +09:00
yui-knk 2d468358a5 Lrama v0.5.7 2023-10-23 13:14:15 +09:00
Nobuyoshi Nakada 9e93af5329 Skip RBS `RbConfig::TOPDIR` test that is `nil` before installation 2023-10-22 08:44:52 +09:00
Nobuyoshi Nakada 0ca5182ae5 RBS no longer has test/stdlib/Prime_test.rb 2023-10-22 08:44:52 +09:00
Nobuyoshi Nakada 361bce8d2c
[Bug #19967] Ignore library before build 2023-10-21 23:47:29 +09:00
Nobuyoshi Nakada 38b79b05fd
Fallback job status to normal if no tty 2023-10-21 19:47:05 +09:00
Nobuyoshi Nakada 54b9b80b84
[Bug #19967] Delete real path 2023-10-21 16:45:03 +09:00
Nobuyoshi Nakada 5e24a4e392
Strip universal_archnames 2023-10-21 15:42:41 +09:00
Nobuyoshi Nakada 665b4c5b2a
[Bug #19967] Reset `LIBPATHENV` env after started
Not to affect other tools invoked as child processes.
2023-10-21 14:05:20 +09:00
Hiroshi SHIBATA bb849ffdb1
Added explicitly begin-end block for Ruby 2.4.
strscan, ipaddr and some default gems still support Ruby 2.4.

  After this, I extract this CoreAssertions to their repositories.
2023-10-20 14:34:08 +09:00
Takashi Kokubun bd2aee67c1 [DOC] "is now bundled" is ambiguous
I think it meant it's now a bundled "gem", but "is now bundled" implies
it's a new gem that was neither default nor bundled gems. So I changed
wording.

I also want to change the subjects and reorder them so that it will read:
"The following default gem" (new) -> "The following default gem" (updated) ->
"The following bundled gem" (new) -> "The following bundled gem" (updated).
2023-10-19 16:37:11 -07:00
Takashi Kokubun c221af2c3d [DOC] Prism is a new default gem 2023-10-19 16:25:33 -07:00
Takashi Kokubun 6d42f4dd2d Avoid using a system Ruby if possible
in tool/update-NEWS-gemlist.rb
2023-10-19 16:10:14 -07:00
Nobuyoshi Nakada 4f4016497e
Handle `Timeout::Error` reported from workers 2023-10-18 23:41:23 +09:00
Nobuyoshi Nakada ff4c98f125
Fix total count when filters given 2023-10-18 12:19:52 +09:00
Nobuyoshi Nakada f13068afaa
Escape method names containing control characters 2023-10-18 10:36:42 +09:00
Takashi Kokubun 6c46ccf226
Prefer RbConfig.ruby over the 3.times fallback (#8691)
It seems saner to use RbConfig.ruby than using ruby in a random ancestor
directory.
2023-10-17 17:57:39 -07:00
Nobuyoshi Nakada 776d4dec69 Manage parallel test workers after timeout 2023-10-18 02:55:42 +09:00
Nobuyoshi Nakada 8b520bd3fb Add `jobs` optional keyword argument 2023-10-18 02:55:42 +09:00
Nobuyoshi Nakada 96cd73d78f
Ignore symbols even in empty shared library
On some platforms, such as FreeBSD and Oracle Linux, symbols defined
in the crt0 setup routine are exported from shared libraries.  So
ignore the symbols that would be exported even in an empty shared
library.
2023-10-14 18:38:24 +09:00
Maxime Chevalier-Boisvert b2e1ddffa5
YJIT: port call threshold logic from Rust to C for performance (#8628)
* Port call threshold logic from Rust to C for performance

* Prefix global/field names with yjit_

* Fix linker error

* Fix preprocessor condition for rb_yjit_threshold_hit

* Fix third linker issue

* Exclude yjit_calls_at_interv from RJIT bindgen

---------

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-10-12 10:05:34 -04:00
Nobuyoshi Nakada 9859dbc7fd
Fix leaked symbols on FreeBSD [ci skip] 2023-10-12 15:07:42 +09:00
Takashi Kokubun 8705e734ed Remove a binding.irb in rjit-bindgen 2023-10-04 11:43:29 -07:00
Nobuyoshi Nakada 94bcae1b2a
Special treat when the first line ends with a dot [ci skip] 2023-10-04 19:27:34 +09:00
Nobuyoshi Nakada 10379ebf90
Support regexp in log-fix [ci skip] 2023-10-03 22:02:02 +09:00
Nobuyoshi Nakada 4909747e5a
Use the hexdigit character class 2023-10-02 00:49:05 +09:00
Nobuyoshi Nakada be09c8370b
tool/enc-unicode.rb: make the condition concice with flip-flop
And regexps are not necessary here.
2023-10-01 22:33:31 +09:00
Kevin Newton a213d21448 Move CRuby-specific prism files to top level 2023-09-28 09:44:16 -04:00
Kevin Newton 3d0a46796b Rename YARP symbols to prism 2023-09-27 13:57:38 -04:00
Kevin Newton 8ab56869a6 Rename YARP filepaths to prism filepaths 2023-09-27 13:57:38 -04:00
Kevin Newton 3cec94624b Rename compiler test to iseq test 2023-09-27 12:10:23 -04:00
Nobuyoshi Nakada d80002c902
Improve VCS::GIT#format_changelog addessing [ci skip] 2023-09-23 16:34:20 +09:00
Nobuyoshi Nakada 7c98d520f4 [Bug #19892] Clean intermediate files regardless `-keep_temp`
Not to include such files in the result packages.
2023-09-21 12:19:00 +09:00
Nobuyoshi Nakada 7ba88e13e0 Make `clean.create` to accept a block
Like `File.open`, yield an IO to write the file.
2023-09-21 12:19:00 +09:00
Nobuyoshi Nakada 3c11cdbcfe Fix the case of file to be ignored with to be removed
The case of 7fc73ab5f6, which modified
`.gitignore` and `.github/workflows/main.yml`.  Both files need to be
rejected and restored, but since the latter file was not there before,
`git checkout` failed and the former file could not be restored along
with it.  To fix this failure, restore the ignored files one by one.
2023-09-20 13:00:18 +09:00
Nobuyoshi Nakada afaa164a05 Add a successful sync test case 2023-09-20 13:00:18 +09:00
Takashi Kokubun 5b00314868 Ignore JRuby extension sync
Avoid alerting on failing with commits like
fb97d899c5
2023-09-19 14:10:38 -07:00
Nobuyoshi Nakada 88262875fd
Fix `git cat-file` condition
When multiple files changed in the same directory to be removed, the
first file only was removed from changed set.
2023-09-18 02:23:59 +09:00
Nobuyoshi Nakada 8d219a9bd7
Refactor test_sync_default_gems.rb 2023-09-18 02:11:48 +09:00
Nobuyoshi Nakada 2dffd36504
Move special patterns to the common pattern 2023-09-17 21:11:54 +09:00
Nobuyoshi Nakada 67dedf8cf6
Ignore changed files under removed paths
This fixes the issue commit 43ab2acf82
"Resurrect gem-specific patterns for sync" described.
2023-09-16 12:00:06 +09:00
Takashi Kokubun 43ab2acf82 Resurrect gem-specific patterns for sync
Yet another partial revert of https://github.com/ruby/ruby/pull/8329,
similar to 00f263e6c4.

Repro: On ruby/ruby@1be64e34d0, `tool/sync_default_gems.rb yarp
162c2088eec6ec8f0558559e082cd661c18ee02a` should exist successfully, but
it doesn't without this gem-specific handling.
2023-09-15 16:54:20 -07:00
yui-knk 4655d2108e Lrama v0.5.6 2023-09-13 18:03:49 +09:00
Hiroshi SHIBATA f1c78b2331 Suppress warning for shadowing outer local variable 2023-09-12 15:10:16 +09:00
Takashi Kokubun 00f263e6c4 sync_default_gems.rb: Deal with conflicts on ignored files
that do not exist in the ruby/ruby side.

This resurrects a line that had existed prior to #8329.
2023-09-01 16:17:59 -07:00
Nobuyoshi Nakada 2ce1b77ce0
sync_default_gems.rb: Discard some error messages
These messages are expected:
- `cat-file -e` at newly added entries.
- `commit --amend` when all changes removed.
2023-08-31 11:32:29 +09:00
Nobuyoshi Nakada cbe36ef6cc
sync_default_gems.rb: Remove the pattern for yarp
Changes to `ext/yarp/extconf.rb` are detected as conflicts now, and
ignored.
2023-08-31 11:32:21 +09:00
Nobuyoshi Nakada 3d2a83b909
sync_default_gems.rb: Remove the pattern for bundler
The "bundler" directory at the top-level will be removed by more
generic rule for top-level new entries.
2023-08-31 10:54:26 +09:00
Nobuyoshi Nakada 97df09f276
sync_default_gems.rb: Refactor
- Filter out files to be ignored first, then resolve conflicts.
- Add "added by gem" files, instead of hard-code paths to add.
- Remove gem specific patterns covered by more generic rules.
2023-08-31 10:30:36 +09:00
Nobuyoshi Nakada dc911a47ce
sync_default_gems.rb: Move ignored_paths to ignore_file_pattern_for 2023-08-31 10:30:35 +09:00
KJ Tsanaktsidis 082962e857 Work around a hang in fork(2) on FreeBSD
See bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271490

On FreeBSDk, it's possible for fork(2) in a multithreaded process to
hang because of a bug in the lock handling of the dynamic linker. This
is now fixed on FreeBSD master, but it would be good if we could work
around it for Ruby CI which is running 13.1.

Setting LD_BIND_NOW seems to work around the problem (probably because
the dynamic linker doesn't then need to resolve anything through the PLT
when it's first called).
2023-08-30 20:47:39 +01:00
Nobuyoshi Nakada 74f4d2683e
sync_default_gems.rb: Remove Java templates 2023-08-30 22:18:10 +09:00
Nobuyoshi Nakada acedbcb1b4
sync_default_gems.rb: Fix typo in replace_rdoc_ref_all 2023-08-30 15:00:00 +09:00
Nobuyoshi Nakada c05737e09f
sync_default_gems.rb: Transform by proc 2023-08-30 14:59:17 +09:00
Soutaro Matsumoto ad2a464e8f
Bundle RBS 3.2.1 (#8306) 2023-08-30 11:10:41 +09:00
Kevin Newton 455153705c Tests for the YARP compiler 2023-08-29 15:53:25 -04:00
Hiroshi SHIBATA 5e81127c1b
Fixed broken -a option behavior 2023-08-29 17:41:26 +09:00
Hiroshi SHIBATA 141102b0b0 Expose Test.filter_backtrace for the default gems. 2023-08-29 15:05:30 +09:00
Nobuyoshi Nakada c4fc9477aa
sync_default_gems.rb: Continue if files added to the toplevel removed 2023-08-29 10:20:52 +09:00
Nobuyoshi Nakada a6db6b150f
sync_default_gems.rb: Split `sync_default_gems_with_commits` 2023-08-29 09:22:28 +09:00
yui-knk c02f978fd5 Lrama v0.5.5 2023-08-29 08:26:18 +09:00
Jemma Issroff 3b815ed7da
Add yarp/yarp_compiler.c (#8042)
* Add yarp/yarp_compiler.c as stencil for compiling YARP

This commit adds yarp/yarp_compiler.c, and changes the sync script
to ensure that yarp/yarp_compiler.c will not get overwritten

* [Misc #119772] Create and expose RubyVM::InstructionSequence.compile_yarp

This commit creates the stencil for a compile_yarp function, which
we will continue to fill out. It allows us to check the output
of compiled YARP code against compiled code without using YARP.
2023-08-28 13:55:58 -07:00
Nobuyoshi Nakada 00439dbdb4
sync_default_gems.rb: convert keys of REPOSITORIES to strings
Referencing always after conversion to a symbol, and yielded gem name
is always converted to a string.
2023-08-28 17:52:50 +09:00
Takashi Kokubun 4963dd6b64 Revert racc auto-sync support
It's no longer a default gem actually.
Fixed the webhook side instead
3c27d860b4.
2023-08-28 01:14:58 -07:00
Takashi Kokubun f5da7c379b Ignore test/regress/ for racc 2023-08-28 01:10:24 -07:00
Takashi Kokubun 94275d96a8 Add missing racc support to sync_default_gems 2023-08-28 00:50:49 -07:00
Takashi Kokubun 4221d9695d Sort repository names in sync_default_gems 2023-08-28 00:50:19 -07:00
Kevin Newton aea7e91828 Fix sync script for YARP 2023-08-25 18:20:51 -04:00
Kevin Newton a7c7cd11bc
Update sync script to handle yarp/version.h 2023-08-25 15:47:25 -04:00
Kevin Newton 9aba46c666
Sync YARP to c175f712522cc315f45cd2da308768b90f324dd0 2023-08-24 11:56:09 -04:00
Nobuyoshi Nakada 5ec1fc52c1
Escape non-ascii characters in prelude C comments
Non-ASCII code are often warned by localized compilers.
2023-08-24 21:12:51 +09:00
Samuel Williams d4c720a91b
Fix support for dynamic keys. (#8273)
* Skip RBS test.
2023-08-24 15:19:33 +12:00
Takashi Kokubun 544488f114 Improve comments in sync_default_gems 2023-08-23 14:22:47 -07:00
Takashi Kokubun 455297d652 Use https for remotes by default
I was testing this script on git.ruby-lang.org to use its git version,
but it did not work because the server's default user doesn't have SSH
keys.

https works for everyone, so it's a safer default. You shouldn't need to
push to that remote from ruby/ruby anyway.
2023-08-23 13:56:49 -07:00
Takashi Kokubun c6a07cc33f Ignore more files for other gems as well
e.g. bin/ for reline that was included in its last commit.
2023-08-23 13:43:47 -07:00
Takashi Kokubun eb795b0325 Avoid sync rule duplication between YARP and others 2023-08-23 13:35:41 -07:00
Nobuyoshi Nakada 129663c4a8
tool/lib/output.rb: Make `--color` option like GNU coreutils 2023-08-23 19:40:56 +09:00
Nobuyoshi Nakada de4a1ca792
tool/lib/output.rb: Add `--create-only` and `--overwrite` options 2023-08-23 19:40:56 +09:00