aboutsummaryrefslogtreecommitdiffstats
path: root/tool
Commit message (Collapse)AuthorAgeFilesLines
* Hack to avoid leak checkerNobuyoshi Nakada2022-05-251-1/+2
|
* [ruby/date] Constify gperf-generated tableNobuyoshi Nakada2022-05-241-0/+1
| | | | https://github.com/ruby/date/commit/6d7ab08ffc
* Rename test_jit to test_mjitTakashi Kokubun2022-05-201-6/+6
| | | | to avoid confusion with YJIT
* Add `make test-annocheck` to detect security issues.Jun Aruga2022-05-163-0/+44
| | | | | | | | | | | | | | * Note that as the annocheck binary package is not available on Ubuntu, and it is working in progress in Debian, the script uses Fedora container, and it requires docker or podman command. https://www.debian.org/devel/wnpp/itp.en.html https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926470 * .github/workflows/compilers.yml: Add "gcc-11 annocheck" case. To pass the CI, set `TEST_ANNOCHECK_OPTS: "--skip-pie --skip-notes"` for now. See <https://bugs.ruby-lang.org/issues/18061>. * Skip MJIT tests in case of annocheck case. The MJIT tests fail in the annocheck case. See <https://bugs.ruby-lang.org/issues/18781>.
* Stop `build_extensions` when DESTDIR setKazuhiro NISHIYAMA2022-05-131-1/+1
| | | | | | Try to fix `make install without root privilege` failures on snapshot CIs. example: https://github.com/ruby/actions/actions/runs/2315349280
* Honor --with-thread option to enable pthreadNobuyoshi Nakada2022-05-101-4/+47
|
* [DOC] Move :nodoc: so rdoc finds `RbConfig.ruby`Alan Wu2022-04-251-2/+1
| | | | | | Rdoc [build] of `master` did not have this method but the reference manual [did]. [build]: https://docs.ruby-lang.org/en/master/RbConfig.html [did]: https://docs.ruby-lang.org/ja/master/class/RbConfig.html#S_RUBY
* rbinstall: Also do `Gem.ruby` patching for unpacked bundled gemsAlan Wu2022-04-221-1/+7
| | | | | | | | | | | | | | | | Pointing `Gem.ruby` to the newly installed ruby gives mkmf the right inputs to build extensions in bundled gems. Previously, this patching was only done for compressed bundled gems. This patch also prevents `tool/fake.rb` from propagating to the child process running mkmf for the native extension. The way `tool/fake.rb` changes mkmf variables using `Kernel#trace_var` created spooky action at a distance which made debugging difficult. AppVeyor Windows CI started to fail starting with 8a3663789c52ec5635194656af6b69d3d03120ee because it enabled extension building for bundled gems on mswin. This patch should address the CI failures.
* Added assert_true and assert_false same as test-unit gemHiroshi SHIBATA2022-04-201-0/+16
|
* Extract `pipe_readlines` method which reads from the pipelineNobuyoshi Nakada2022-04-161-5/+9
|
* Simplify the condition expression to ignore commitsNobuyoshi Nakada2022-04-161-1/+1
|
* Do not import any files under rakelibNobuyoshi Nakada2022-04-161-3/+5
|
* Fix bundled gems installation when relative loadingNobuyoshi Nakada2022-04-161-3/+7
|
* Skip build extensions again on cross compiling tooKazuhiro NISHIYAMA2022-04-131-1/+1
|
* Skip build extensions again on mswin and mingwKazuhiro NISHIYAMA2022-04-131-0/+3
|
* Enabled to build extensions with the bundled gems againKazuhiro NISHIYAMA2022-04-131-3/+0
| | | | | https://github.com/ruby/ruby/commit/cbb115213c42f15638ef119eb20c4d3106eb8b1a https://github.com/ruby/ruby/commit/5c1b76a3a55afeb07116bbd3492303c6b6cd890d
* Install built gem extension binariesNobuyoshi Nakada2022-04-071-40/+16
|
* Obey spec file locations to rubygemsNobuyoshi Nakada2022-04-071-2/+3
|
* Copyedit parallel test harness crash messageAlan Wu2022-04-061-1/+1
| | | | | | Mea culpa. Co-authored-by: Kaíque Kandy Koga <kaiquekandykoga@gmail.com>
* Copyedit parallel test harness crash messageAlan Wu2022-04-061-2/+2
|
* Try to fix NoMethodError on slow environmentsKazuhiro NISHIYAMA2022-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` 1) Failure: TestParallel::TestParallel#test_hungup [/home/user/ruby/tool/test/testunit/test_parallel.rb:215]: Expected /^Retrying hung up testcases\.+$/ to match "Run options: \n" + " --seed=43403\n" + " --ruby\n" + " \"./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems\"\n" + " -j\n" + " t1\n" + " --worker-timeout=1\n" + "\n" + "# Running tests:\n" + "\n" + "/home/user/ruby/tool/lib/test/unit.rb:687:in `block in _run_parallel': undefined method `<' for nil:NilClass (NoMethodError)\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:538:in `block in quit_workers'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:537:in `reject!'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:537:in `quit_workers'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:687:in `_run_parallel'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:810:in `_run_suites'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:849:in `_run_suites'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1479:in `_run_anything'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1263:in `_run_anything'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1654:in `run_tests'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1641:in `block in _run'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1640:in `each'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1640:in `_run'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1682:in `run'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1034:in `run'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:882:in `run'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:154:in `run'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1761:in `run'\n" + "\tfrom /home/user/ruby/tool/lib/test/unit.rb:1765:in `run'\n" + "\tfrom /home/user/ruby/tool/test/testunit/tests_for_parallel/runner.rb:14:in `<main>'\n". ```
* Use latest RSpec to get rspec-mocks ruby2_keywords fixBenoit Daloze2022-04-052-9/+9
|
* Finer-grained constant cache invalidation (take 2)Kevin Newton2022-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This commit reintroduces finer-grained constant cache invalidation. After 8008fb7 got merged, it was causing issues on token-threaded builds (such as on Windows). The issue was that when you're iterating through instruction sequences and using the translator functions to get back the instruction structs, you're either using `rb_vm_insn_null_translator` or `rb_vm_insn_addr2insn2` depending if it's a direct-threading build. `rb_vm_insn_addr2insn2` does some normalization to always return to you the non-trace version of whatever instruction you're looking at. `rb_vm_insn_null_translator` does not do that normalization. This means that when you're looping through the instructions if you're trying to do an opcode comparison, it can change depending on the type of threading that you're using. This can be very confusing. So, this commit creates a new translator function `rb_vm_insn_normalizing_translator` to always return the non-trace version so that opcode comparisons don't have to worry about different configurations. [Feature #18589]
* Remove CI configuration files from extracted bundled gemsNobuyoshi Nakada2022-03-311-0/+4
|
* Fix locations of the second argumentNobuyoshi Nakada2022-03-302-2/+2
|
* Fix a missing commaNobuyoshi Nakada2022-03-281-1/+1
|
* Use m4 comments outside macros in m4 filesNobuyoshi Nakada2022-03-281-3/+3
|
* Extract RUBY_REQUIRE_FUNCSNobuyoshi Nakada2022-03-281-0/+13
|
* Revert "Finer-grained inline constant cache invalidation"Nobuyoshi Nakada2022-03-251-2/+2
| | | | | | | | | | | | This reverts commits for [Feature #18589]: * 8008fb7352abc6fba433b99bf20763cf0d4adb38 "Update formatting per feedback" * 8f6eaca2e19828e92ecdb28b0fe693d606a03f96 "Delete ID from constant cache table if it becomes empty on ISEQ free" * 629908586b4bead1103267652f8b96b1083573a8 "Finer-grained inline constant cache invalidation" MSWin builds on AppVeyor have been crashing since the merger.
* Finer-grained inline constant cache invalidationKevin Newton2022-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add ISEQ_BODY macroPeter Zhu2022-03-242-4/+4
| | | | | | 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.
* extlibs.rb: Add fallback `Colorize`Nobuyoshi Nakada2022-03-241-1/+11
| | | | | To get rid of an unnecessary dependency for the case using in other repositories.
* extlibs.rb: Enclose `Vars` in `ExtLibs` classNobuyoshi Nakada2022-03-241-11/+11
| | | | | To get rid of an unnecessary top-level constant for the case using as a library.
* extlibs.rb: Extract ExtLibs#processNobuyoshi Nakada2022-03-241-66/+78
| | | | | | | | | 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.
* Ignore pre-release for sync target on sync_default_gemsHiroshi SHIBATA2022-03-101-1/+1
|
* Added release option to sync only released version of the default gemsHiroshi SHIBATA2022-03-081-5/+18
|
* Merge RubyGems and Bundler masterHiroshi SHIBATA2022-02-281-1/+1
|
* fake.rb: Set prefix to `$topdir`Nobuyoshi Nakada2022-02-271-0/+1
| | | | Not to refer outside the top build directory from rbconfig.
* [ruby/date] Use `assert_deprecated_warn`Nobuyoshi Nakada2022-02-251-2/+2
| | | | https://github.com/ruby/date/commit/c55004715a
* Add ABI version to RUBY_LIB_VERSIONPeter Zhu2022-02-241-9/+0
| | | | | | 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.
* [Feature #18249] Implement ABI checkingPeter Zhu2022-02-222-0/+10
| | | | | | | | | | | | | | | | | | | | 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"]`.
* RUBY_REPLACE_TYPE: check if the target type is a pointerNobuyoshi Nakada2022-02-191-1/+11
|
* gen-mail.rb: support markdown file pathNARUSE, Yui2022-02-181-4/+9
|
* fix parallel test timeout retryingKoichi Sasada2022-02-161-1/+13
| | | | | | | | | 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
* Treat TS_ICVARC cache as separate from TS_IVC cacheJemma Issroff2022-02-021-0/+1
|
* Sync latest Bundler & RubyGemsDavid Rodríguez2022-02-013-0/+100
|
* [ruby/logger] Fix log rotation inter-process lock failed.Jesse Chavez2022-01-271-1/+1
| | | | | | | | | | | | 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
* add `--stderr-on-failure` option to test-allKoichi Sasada2022-01-261-1/+7
| | | | | Now all failure messages are printed to stdout. This option makes all failure messages printed into stderr.
* [ruby/pathname] Officially drop support for ruby 2.6 or olderDavid Rodríguez2022-01-251-1/+1
| | | | | | | | | | | | | | | | | 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
* Reuse the default `AC_LANG_PROGRAM(C)` definitionNobuyoshi Nakada2022-01-231-9/+1
|