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

Allow extconf.rb to cancel building the extension #7372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 10, 2024

  1. Allow extconf.rb to cancel building the extension

    Ref: https://bugs.ruby-lang.org/issues/20152
    
    There are various gems that ship with a native extension as a way to
    speedup part of the gem, but also ship with a pure Ruby version of
    these methods as a fallback. So they only want to compile the extension
    if the platform supports it, and if not, just fallback Ruby implementation.
    
    Right now users rely on one of two hacks to do this. Either they create
    an empty Makefile, but then still depend on make being available and it
    feels very hacky, or they publish platform specific packages without any
    extension in them.
    
    Examples include `bootnsap`, `erb`, `hiredis-client`, `ddtrace`, `prism`.
    
    This changes attempt to make this use case a first class citizen by
    checking if the `extconf.rb` did generate a `gem.build_skipped` file.
    If it did, `make` isn't invoked at all.
    byroot committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    0ef7daf View commit details
    Browse the repository at this point in the history