Skip to content

RFC: Provide easy access to the cross-rubies from the build process #149

@flavorjones

Description

@flavorjones

Context

Currently, any gem maintainer who wishes to limit the precompiled extensions to only a few recent rubies must set RUBY_CC_VERSION to a specific set of Ruby versions to inform rake-compiler.

Practically, this means that every gem's build process somewhere is hard-coding ruby versions. Some examples:

Previously, this was not a big deal because we generally settled on the .0 release for the cross-rubies. However, starting with v1.6.0 we've started upgrading the cross-rubies' patch levels for various reasons. This makes upgrading rake-compiler-dock annoying because now everyone has to update these hard-coded values.

Proposal

I'm proposing that the rake-compiler-dock gem make these cross-ruby versions available to gem maintainers for use at build time.

Specifically I'm proposing (and would like feedback on) a method RakeCompilerDock.cross_rubies which returns a Hash<minor ⇒ patch>, e.g.:

{
  "3.4" => "3.4.1",
  "3.3" => "3.3.7",
  ...
  "2.4" => "2.4.10"
}

Then gems could assemble a correct/valid value for RUBY_CC_VERSIONS using only the minor versions that will be packaged.

I'd love to get a 👍 or 👎 and a comment from folks.

/cc @mudge @stanhu @larskanis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions