Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YJIT: Use RbConfig.ruby instead of EnvUtil.rubybin #8689

Merged
merged 2 commits into from Oct 18, 2023

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Oct 17, 2023

EnvUtil.invoke_ruby uses EnvUtil.rubybin by default, which has a weird fallback logic that is not necessary for test_yjit.

Since there are folks reporting test_yjit failures we can't reproduce, I want to rule out that possibility by always using RbConfig.ruby.

Some people encounter an issue that test_yjit uses the installed Ruby
instead of the currently-running Ruby. It's fixed when they remove the
installed Ruby.

However, test_yjit should run the currently-running Ruby for testing
YJIT in subprocesses. EnvUtil is unfortunately used outside tests as
well, so for compatibility reasons, this commit only changes the
argument given to EnvUtil.invoke_ruby to always use RbConfig.ruby.
@k0kubun k0kubun marked this pull request as ready for review October 17, 2023 21:36
@matzbot matzbot requested a review from a team October 17, 2023 21:36
Copy link
Member

@XrXr XrXr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. By the way, I dug a little bit after looking at the logic in EnvUtil.invoke_ruby and it was actually using RUBY=build_dir/exe/ruby from the environment set by runruby.rb, and make test-all only builds ruby, but doesn't copy it over to exe/ruby.

test/ruby/test_yjit.rb Outdated Show resolved Hide resolved
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
@k0kubun k0kubun enabled auto-merge (squash) October 17, 2023 22:50
@k0kubun k0kubun merged commit 7a3a98e into ruby:master Oct 18, 2023
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants