nokogiri icon indicating copy to clipboard operation
nokogiri copied to clipboard

clean up platform detection in extconf.rb

Open flavorjones opened this issue 9 years ago • 3 comments
trafficstars

We do a variety of stupid things including

  • using RbConfig::CONFIG['target_os'] and RUBY_PLATFORM and RUBY_ENGINE and RCD_HOST_RUBY_PLATFORM
  • subtly varying things to match on windows: mswin, mingw, mingw32, cygwin

flavorjones avatar May 31 '16 07:05 flavorjones

It's sad, but build scripts with support for a variety of platforms are rarely straightforward. I don't think we can decrease the number of variables and conditions substantive. The tests are related to different issues.

For the Windows matches: Some of the tests are for Windows as the OS, some issues are specific to MRIs build environment mingw/mingw-w64, but don't apply to cygwin and some are specific to cross build for Windows/RubyInstaller.

larskanis avatar May 31 '16 11:05 larskanis

I guess my point is that these tests aren't wrapped in a method with a semantic name that tells me what it does.

I've started this process with commit aa1baf4

Perhaps this is just a reminder to continue to whittle away at the accidental complexity in extconf.rb.

flavorjones avatar May 31 '16 12:05 flavorjones

Now I get it.

larskanis avatar May 31 '16 13:05 larskanis

I think we've cleaned most of this up over the last few years.

flavorjones avatar Jul 02 '24 19:07 flavorjones