Commit graph

86164 commits

Author SHA1 Message Date
Nobuyoshi Nakada
1213623e5c
Use gperf 3.1 to generate ANSI-C code 2024-06-24 23:43:45 +09:00
Jean Boussier
95ffcd3f9f Fix --debug-frozen-string-literal to not apply --disable-frozen-string-literal
[Feature #20205]

This was an undesired side effect. Now that this value is a triplet, we can't
assume it's disabled by default.
2024-06-24 12:43:39 +02:00
Yusuke Endoh
9cfc1362aa Extend the timeout of test_try_ldflag_invalid_opt and test_try_cppflag_invalid_opt 2024-06-24 18:14:34 +09:00
Nobuyoshi Nakada
65d3eacc80 No longer needs sigsetjmp
Since signal handlers just set flag and return now, `sigsetjmp` and
`siglongjmp` will not be needed.
2024-06-24 17:38:01 +09:00
Koichi Sasada
92f2cf1bf9 With ASAN EC_REPUSH_TAG doesn't work
With ASAN, `EC_TMPPOP_TAG`/`EC_REPUSH_TAG` doesn't work
so rewrite it without them. They are used for the performance,
but here calling stacked `END{}` and not so performance critical.
2024-06-24 16:50:09 +09:00
Naoto Ono
afd42e4db7 Use $GITHUB_PATH 2024-06-24 13:25:30 +09:00
Naoto Ono
a22448df9d Integrate Launchable into mingw 2024-06-24 13:25:30 +09:00
Yusuke Endoh
96b45e61ca Introduce retry to the setup of test files with TestFile#test_stat
GitHub Actions macos-arm-oss is often too slow and does not timestamp as
expected.
2024-06-24 13:18:21 +09:00
Yusuke Endoh
ace17ba3cd Extend the timeout of Fiddle::TestFunction#test_nogvl_poll 2024-06-24 13:11:45 +09:00
Yusuke Endoh
3a323c6b12 Extend the timeout of TestVMDump#test_darwin_invalid_call, etc. 2024-06-24 11:54:10 +09:00
Hiroshi SHIBATA
2b5ddcee56 Removed obsoleted workaround for OpenSSL 2024-06-24 10:48:15 +09:00
Hiroshi SHIBATA
f58fef62dc Use expanded path for --with-opt-dir 2024-06-24 10:48:15 +09:00
Hiroshi SHIBATA
5f5da2e839 Use manifest mode of vcpkg 2024-06-24 10:48:15 +09:00
MSP-Greg
18404af9ec .github/actions/setup/macos/action.yml - use brew openssl@3, not 1.1 2024-06-24 09:03:55 +09:00
git
acce96647d Update bundled gems list as of 2024-06-22 2024-06-23 06:59:37 +00:00
Nobuyoshi Nakada
d8c6e91748
Fix dangling else 2024-06-23 09:42:25 +09:00
Dmitry Davydov
fba8aff7af [Bug #20592] Fix segfault when sending NULL to freeaddrinfo
On alpine freeaddrinfo does not accept NULL pointer
2024-06-22 22:05:31 +09:00
Nobuyoshi Nakada
d122a68863
Exported symbols in DLL on Windows are managed by win32/mkexports.rb 2024-06-22 18:48:14 +09:00
Yuta Saito
73b7eebf07 build: fix crossruby build by handling empty ac_abs_builddir
`ac_abs_builddir` can be empty when the build is top-level (not
subdirs, and Ruby is usually the case). In such case, the MINIRUBY is
expanded to `$RUBY -I -r'$(arch)-fake'`, which interprets `-r$(arch)-fake`
as an argument to `-I` option. This led to:
- Not loading the fake config file
- Then not setting `CROSS_COMPILING` constant during extmk.rb execution
- Then misusing cross-compiled `./miniruby` instead of baseruby to generate
  files used in exts.

This commit fixes the issue by handling the empty `ac_abs_builddir` case
properly.
2024-06-22 15:12:00 +09:00
Nobuyoshi Nakada
cab0d03037
Get rid of nesting backquotes
Also executing variable containing an option may not be portable.
Follow up of dd378c5a24.
2024-06-22 10:58:32 +09:00
Nobuyoshi Nakada
dd378c5a24
Expand --with-opt-dir arguments 2024-06-22 02:16:16 +09:00
Peter Zhu
90763e04ba Load external GC using command line argument
This commit changes the external GC to be loaded with the `--gc-library`
command line argument instead of the RUBY_GC_LIBRARY_PATH environment
variable because @nobu pointed out that loading binaries using environment
variables can pose a security risk.
2024-06-21 11:49:01 -04:00
Koichi Sasada
bd583ca645 retry on cancelling of getaddrinfo
When the registerred unblock function is called, it should retry
the cancelled blocking function if possible after checkints.

For example, `SIGCHLD` can cancel this method, but it should not
raise any exception if there is no trap handlers.

The following is repro-code:

```ruby
require 'socket'
PN = 10_000

1000000.times{
  p _1
  PN.times{
    fork{
      sleep rand(0.3)
    }
  }
  i = 0
  while i<PN
    cpid = Process.wait -1, Process::WNOHANG
    if cpid
      # p [i, cpid]
      i += 1
    end

    begin
      TCPServer.new(nil, 0).close
    rescue
      p $!
      exit!
    end
  end
}
```
2024-06-21 22:36:42 +09:00
Yusuke Endoh
9a22d4b9a0 [ruby/prism] Update #line that was missed to update
Follow up 1a2626be27

8174aac929
2024-06-21 12:32:04 +00:00
Hiroshi SHIBATA
bf061ce6fe Use the official way for binary cache with vcpkg
https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
2024-06-21 18:25:03 +09:00
Yusuke Endoh
ac9e84df3d Support LCOV 2.0
LCOV 2.0, a GCOV frontend, seems to have stricter error checking
2024-06-21 14:48:44 +09:00
Yusuke Endoh
47364c147d Apply EnvUtil.apply_timeout_scale for TestFile#test_stat
... to respect RUBY_TEST_TIMEOUT_SCALE. This test somehow fails
frequently on macos-arm-oss with --repeat-count=2

https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat?organizationId=ruby&workspaceId=ruby&testPathId=file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat&testSessionStatus=flake
2024-06-21 13:57:07 +09:00
ccmywish
185a6c991e [rubygems/rubygems] Update contents of gem.bat on Windows
(https://github.com/rubygems/rubygems/pull/6483)

41d8cffd2e

Co-Authored-By: MSP-Greg <Greg.mpls@gmail.com>
2024-06-21 02:27:47 +00:00
Nobuyoshi Nakada
249a1fb0eb
Show more in RBIMPL_ASSERT_TYPE 2024-06-21 09:25:00 +09:00
Nobuyoshi Nakada
b834c62efd
Delegate from RBIMPL_ASSERT_OR_ASSUME to RUBY_ASSERT_ALWAYS
Get rid of expansion of the argument which often contains complicated
macros, and simplify the failure message.
2024-06-21 09:24:59 +09:00
Koichi Sasada
b182f2a045 fix sendfwd with send and method_missing
combination with `send` method (optimized) or `method_missing`
and forwarding send (`...`) needs to respect given
`rb_forwarding_call_data`. Otherwize it causes critical error
such as SEGV.
2024-06-21 00:43:48 +09:00
Peter Zhu
f5fd87b695 Make ruby_external_gc_init static
This function is not used outside of gc.c.
2024-06-20 11:34:52 -04:00
Jeremy Evans
a47a176768 Skip 3 specs when $HOME is not a valid directory
If $HOME isn't a valid directory, these specs fail, but I think it
is better to skip in this case, as it does not indicate a bug.

This fixes specs when run in the OpenBSD port, which sets $HOME
to an invalid directory to ensure that software's build system
is not accidentally relying on it.
2024-06-20 07:54:02 -07:00
Kevin Newton
9bd5995b40 [PRISM] Remove duplicated tests
These tests are flaky and are duplicative of other tests that are
run in CI when parser=prism.
2024-06-20 09:24:19 -04:00
Yusuke Endoh
c3b5b98e15 [ruby/prism] Set `#line" directives to respect the path in ruby/ruby repo
ruby/ruby measures test coverage of C code, but the `#line` directive
generated by prism points to a file that does not exist, so coverage is
not taken properly.

This changeset specifies the location of the source files as a relative
path in terms of ruby/ruby repo.

1a2626be27
2024-06-20 12:36:18 +00:00
David Rodríguez
0a9f1ecc37 [rubygems/rubygems] Add a regression test for previous bundler update --bundler fix
c392593dc3
2024-06-20 09:26:33 +00:00
nick evans
b558fc0e36 [ruby/securerandom] Update UUID documentation with RFC9562 links
RFC9562 was released almost two weeks ago, so we can replace the "draft"
UUIDv7 URL with the final RFC URL too.  RFC9562 obsoletes RFC4122, so I
replaced its link as well.

1e41c3d2cb
2024-06-20 08:34:31 +00:00
Nobuyoshi Nakada
92ab2dac22 [rubygems/rubygems] Check if failed with the expected error
3f22e9df8d
2024-06-20 07:16:56 +00:00
Nobuyoshi Nakada
e345970707 [rubygems/rubygems] Revert "Workaround for TruffleRuby that set nil to LIBRUBY_RELATIVE"
This reverts commit 06fd399973, for a
bug that is fixed by 0148cce153.

907e51e521
2024-06-20 07:16:55 +00:00
David Rodríguez
f7acfeb4ce [rubygems/rubygems] Fix credentials being readded when re-resolving without a full unlock
a8670e43f8
2024-06-20 07:15:06 +00:00
David Rodríguez
bf6b8dd6a8 [rubygems/rubygems] Fix bundle update <gem_name> edge case
When locked only to RUBY, and some locked spec does not meet locked
dependencies, Bundler would remove the only locked platform and end up
creating a lockfile with empty sections.

We can't rely on our criteria to remove invalid platforms if locked
specs are not valid in the first place.

1dba05cf53
2024-06-20 07:14:47 +00:00
David Rodríguez
f445d54f91 [rubygems/rubygems] Move constant to the proper place
9f08241d01
2024-06-20 15:22:52 +09:00
David Rodríguez
ae7d609456 [rubygems/rubygems] Don't expire git specs unnecessarily when remote! or cached! are used
04b26731cb
2024-06-20 15:22:20 +09:00
David Rodríguez
0610302a8f [rubygems/rubygems] Don't validate local gemspec twice
Calling `remote!` or `cached!` on the source was expiring local specs
for now reason. It's unnecessary to override these methods for path
sources since they only deal with local specifications.

aa93b196a2
2024-06-20 15:22:13 +09:00
David Rodríguez
758e01d39d [rubygems/rubygems] Make sure to not re-resolve when a not fully specific local platform is locked
36a02c6128
2024-06-20 15:21:08 +09:00
David Rodríguez
c6a28b02c9 [rubygems/rubygems] Always resolve against the local platform
If RUBY is the only platform in the lockfile, we were skipping adding
the local platform to the list of resolution platforms. This generally
works anyways, because we had some code to still add it if the RUBY
platform is not valid for the set of locked gems.

However, sometimes it can happen that "RUBY" is valid for the current
set of locked gems, but when adding a new dependency, it becomes
invalid. For example, when adding sorbet to a Gemfile, that will
introduce `sorbet-static` as an indirect dependency which does not have
a generic "RUBY" variant. This will cause resolution to take a long time
continuously backtracking trying to find solutions that don't introduce
`sorbet-static` as a dependency and will eventually fail.

Instead, we can always add the local platform to the set of resolution
platforms before resolving, and remove it as necessary after resolution
so that we lock the correct set of platforms.

6ed1fe6050
2024-06-20 15:20:57 +09:00
David Rodríguez
9e713f0e8c [rubygems/rubygems] Remove no longer needed condition
The `force-ruby-platform` settings is properly respected when
materializing since e17d7e9efb.

c4ba54eb96
2024-06-20 15:20:47 +09:00
Martin Emde
af304ad952 [rubygems/rubygems] Revert to splitting parser due to performance regression
* The string search parser was more memory efficient but
  in some cases, much slower. Reverting until a better
  solution is found.
* Handle the situation where the line might be blank (Artifactory bug)

222d38737d
2024-06-20 15:18:56 +09:00
Aaron Patterson
0e1182f93c [ruby/fiddle] Remove Vim commands
(https://github.com/ruby/fiddle/pull/140)

Some of these commands just don't work (for example `sws` is not a Vim
setting). I think we should just remove these.

c3dbf7ba9a
2024-06-20 15:16:57 +09:00
Nobuyoshi Nakada
c2fd3dfb98
[ruby/date] Update zonetab.h at 2024-06-19
8e5efd4f59
2024-06-20 15:16:48 +09:00