oxidize-rb / rb-sys

Easily build Ruby native extensions in Rust
https://oxidize-rb.github.io/rb-sys/
Apache License 2.0
230 stars 35 forks source link

RbConfig: check if config dump succeeded #321

Closed ngroman closed 8 months ago

ngroman commented 9 months ago

Adds a defensive check to make sure the call to dump the RbConfig::CONFIG exited successfully.

This makes it easier to diagnose a failure due to bazel misconfiguration. Without this the failure manifests as an empty config map and later as panicked at 'Key not found: MAJOR'

ngroman commented 9 months ago

Happy to riff on the error message wording here, but this would have definitely saved me a huge headache earlier today.

ianks commented 8 months ago

Thanks for this, will ship it! ❤️

ianks commented 8 months ago

ruby-head is busted for CI, not due to your changes