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

Tests in spec-runner/vendor/ruby are not for MRI 3.1.2 #2263

Open
xulaus opened this issue Nov 4, 2022 · 2 comments
Open

Tests in spec-runner/vendor/ruby are not for MRI 3.1.2 #2263

xulaus opened this issue Nov 4, 2022 · 2 comments
Labels
A-deps Area: Source and library dependencies. A-spec Area: ruby/spec infrastructure and completeness. B-mruby Backend: Implementation of artichoke-core using mruby. S-blocked Status: Marked as blocked ❌ on something else such as other implementation work.

Comments

@xulaus
Copy link
Contributor

xulaus commented Nov 4, 2022

Tests in spec-runner/vendor appear to not be for MRI 3.1.2 despite that being the target API listed in the documentation (RUBYSPEC.md).

For example, there is test in the spec for String#upcase that relies on String#taint which was removed in Ruby 2.7 (tracking issue here)

it "taints result when self is tainted" do
"".taint.upcase.tainted?.should == true
"X".taint.upcase.tainted?.should == true
"x".taint.upcase.tainted?.should == true
end

The vendored version in artichoke-core is up to date however

ruby_version_is ''...'2.7' do
it "taints result when self is tainted" do
"".taint.upcase.should.tainted?
"X".taint.upcase.should.tainted?
"x".taint.upcase.should.tainted?
end
end

@xulaus
Copy link
Contributor Author

xulaus commented Nov 4, 2022

I'd happly submit a PR for this, but I was unsure if there was some upgrade process for the vendored rubies that I couldn't see.

@lopopolo
Copy link
Member

Hi @xulaus thanks for the report and so sorry it took me a while to get to this. I would very much like to do this but the upgrade process is fairly involved and I think I'm the only one who can do it.

The @artichoke organization maintains forks of both MSpec (the ruby/spec test framework) and ruby/spec:

These forks maintain a branch called artichoke-vendor which as of now forks off from Ruby 2.6.3 and applies some patches to get things running on Artichoke.

A snapshot of these repositories from their artichoke-vendor branch is copied into the spec-runner workspace at spec-runner/vendor/{mspec,spec}.

The above info should be laid out here: https://github.com/artichoke/artichoke/blob/7d59abcfafbca574a6e10996e977697fdab39314/spec-runner/vendor/README.md.

To upgrade to Ruby 3.1.2's version of ruby/spec requires updating MSpec. A PR is up for this:

Unfortunately, #2189 is blocked on missing parts of the Hash API. I was planning on deferring this until re-implementing Hash in Rust, but the timelines on this work are unknown.

@lopopolo lopopolo added S-blocked Status: Marked as blocked ❌ on something else such as other implementation work. A-deps Area: Source and library dependencies. A-spec Area: ruby/spec infrastructure and completeness. B-mruby Backend: Implementation of artichoke-core using mruby. labels Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-deps Area: Source and library dependencies. A-spec Area: ruby/spec infrastructure and completeness. B-mruby Backend: Implementation of artichoke-core using mruby. S-blocked Status: Marked as blocked ❌ on something else such as other implementation work.
Development

No branches or pull requests

2 participants