From: "ioquatix (Samuel Williams) via ruby-core" Date: 2025-07-27T23:01:04+00:00 Subject: [ruby-core:122868] [Ruby Bug#21521] Don't require dummy makefile in `extconf.rb` Issue #21521 has been reported by ioquatix (Samuel Williams). ---------------------------------------- Bug #21521: Don't require dummy makefile in `extconf.rb` https://bugs.ruby-lang.org/issues/21521 * Author: ioquatix (Samuel Williams) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- On some platforms, no native extensions should be created. Due to limitations in `mkmf`, it is typical to create a dummy makefile that does nothing: https://github.com/search?q=File.write+Makefile+path%3A**%2Fextconf.rb&type=code This seems like a bad pattern, I think it would be preferable to just do: ``` # extconf.rb return if build_not_required? require "mkmf" ... create_makefile ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/