Skip to content

Commit 280b0f8

Browse files
committed
Skip extension builds for default gems
Seems to be issues launching these subprocesses via Maven. While we investigate that, temporarily disable extension building for default gems. The problem manifests during the default gem install of the fiddle gem, which generates a dummy Makefile on JRuby because it uses the FFI version instead. The launch of extconf.rb exhibits problems in various environments: * In CI, it ends up running with the system default Java rather than the one configured in JAVA_HOME. * On local Linux environments, it fails to launch due to a "bar file descriptor: /bin/sh" error. It seems that the subprocess launch is losing environment in some broken way.
1 parent 8b3b9a0 commit 280b0f8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/pom.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,18 @@ def log(message=nil)
252252
File.join(global_bin, "jruby#{RbConfig::CONFIG['EXEEXT']}")
253253
end
254254

255+
# Disable extension build for gems (none of ours require a build)
256+
class Gem::Ext::Builder
257+
def build_extensions
258+
return if @spec.extensions.empty?
259+
260+
say "Skipping native extensions."
261+
262+
FileUtils.mkdir_p File.dirname(@spec.gem_build_complete_path)
263+
FileUtils.touch @spec.gem_build_complete_path
264+
end
265+
end
266+
255267
ctx.project.artifacts.select do |a|
256268
a.group_id == 'rubygems' || a.group_id == 'org.jruby.gems'
257269
end.each do |a|

0 commit comments

Comments
 (0)