Skip to content

Commit

Permalink
Skip extension builds for default gems
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
headius committed Nov 9, 2024
1 parent a241e98 commit d4849c5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,18 @@ def log(message=nil)
File.join(global_bin, "jruby#{RbConfig::CONFIG['EXEEXT']}")
end

# Disable extension build for gems (none of ours require a build)
class Gem::Ext::Builder
def build_extensions
return if @spec.extensions.empty?

say "Skipping native extensions."

FileUtils.mkdir_p File.dirname(@spec.gem_build_complete_path)
FileUtils.touch @spec.gem_build_complete_path
end
end

ctx.project.artifacts.select do |a|
a.group_id == 'rubygems' || a.group_id == 'org.jruby.gems'
end.each do |a|
Expand Down

0 comments on commit d4849c5

Please sign in to comment.