From 9ef20e5b84df68d8888dfcd9b5639150c4c058e7 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Wed, 24 Apr 2024 19:40:24 -0700 Subject: [PATCH] (FACT-3434) Accept ffi >= 1.16.3, < 1.17.0 ffi 1.16.0 - 1.16.2 had a bug when defining a layout in an FFI::Struct and it was fixed in 1.16.3[1]: ERROR -- : Facter::InternalFactManager - can't modify frozen Hash: \ {:void=>#= 1.16.0 introduces breaking changes, so we pin to the version prior -# for now group(:integration, optional: true) do - gem 'ffi', '1.15.5', require: false + # 1.16.0 - 1.16.2 are broken on Windows + gem 'ffi', '>= 1.15.5', '< 1.17.0', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2', require: false end group(:documentation) do diff --git a/facter.gemspec b/facter.gemspec index 47c41c76da..2be6a90202 100644 --- a/facter.gemspec +++ b/facter.gemspec @@ -34,7 +34,8 @@ Gem::Specification.new do |spec| # or indirectly contain native extensions. The intent behind excluding these # gems from runtime dependencies is to allow users to be able to install # Facter without a compiler. - spec.add_development_dependency 'ffi', '1.15.5' + # ffi 1.16.0 - 1.16.2 are broken on Windows + spec.add_development_dependency 'ffi', '>= 1.15.5', '< 1.17.0', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2' spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'rubocop', '~> 1.28' # last version to support 2.5