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

Won't build with Ruby head #281

Closed
MSP-Greg opened this issue Mar 23, 2024 · 7 comments · Fixed by #288
Closed

Won't build with Ruby head #281

MSP-Greg opened this issue Mar 23, 2024 · 7 comments · Fixed by #288

Comments

@MSP-Greg
Copy link

I've got some code that runs regularly, and I have run it for years with Windows Ruby head (ucrt). I can't build Commonmarker v1.

I then added it to CI (test.yml), and it failed to build on all three platforms. See:

https://github.com/MSP-Greg/commonmarker/actions/runs/8402231998

Not sure if it's considered an issue. I'm not familiar with Rust, so I'm not sure whether it's a Ruby issue or a Commonmarker issue.

@gjtorikian
Copy link
Owner

Ah, if I had to guess, it's because rb-sys itself doesn't support ruby-head / 3.4: https://github.com/oxidize-rb/rb-sys/blob/ad4f0e5445e860e56c802064ddf49eeabe1054e8/.github/workflows/ci.yml#L37

@ianks Does that sound right to you? (Note that this is not me asking for 3.4/head support, just wondering if that's a plausible reason for this.)

@MSP-Greg
Copy link
Author

I just 'copied' the file crates/rb-sys/src/stable_api/ruby_3_4.rs (from ruby_3_23rs) in rb-sys, then ran CI with Ruby head. No OS's passed.

Your guess is probably correct.

@ianks
Copy link

ianks commented Mar 24, 2024

Things work perfectly with ruby-head, but you need to enable the stable-api-compiled-fallback in your Cargo.toml feature for it to work. If that's not easy to do, you can also set RB_SYS_STABLE_API_COMPILED_FALLBACK=true as an env var.

@gjtorikian
Copy link
Owner

Got it, thank you! For reference here’s the source PR: oxidize-rb/rb-sys#229

@MSP-Greg see if that works out for you. To be honest, I don’t really feel comfortable officially supporting ruby-head myself; I’m just one extremely busy person and the idea of opening the door to unofficial Ruby releases already stresses me out. 😆 But if you want to make a case for why it should be supported I am all ears.

Closing this out because I like to keep my issues clean, but we can keep discussing.

@ianks
Copy link

ianks commented Mar 24, 2024

@gjtorikian I'd encourage testing against ruby-head to help ruby core develop more easily. We run ruby-head in prod and anytime an extension fails to compile on ruby head, there's a lot of disruption. FWIW, stable-api-compiled-fallback should make it easy, and if not then that's a bug.

@gjtorikian
Copy link
Owner

Ok, you convinced me! Reopening since there's a task here.

I'll take a PR for this, as I haven't got time to investigate the work. But I'll get to it after I finish #276.

@gjtorikian gjtorikian reopened this Mar 25, 2024
@MSP-Greg
Copy link
Author

JFYI, I quickly checked today using RB_SYS_STABLE_API_COMPILED_FALLBACK=true, and that did not work. But, I haven't checked with Ruby 3.3, nor any Ruby version on Ubuntu or macOS.

Or, with Windows locally, it may be some squirrelly build tool issue... More time later in the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants