Skip to content

Commit

Permalink
Accept ffi >= 1.16.3, < 1.17.0
Browse files Browse the repository at this point in the history
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.

See puppetlabs/facter#2707

(cherry picked from commit aa51340)
  • Loading branch information
joshcooper authored and AriaXLi committed May 9, 2024
1 parent 858752f commit cc73049
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ group(:features) do
end

group(:test) 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
gem "json-schema", "~> 2.0", require: false
gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 13.0')
gem "rspec", "~> 3.1", require: false
Expand Down
9 changes: 5 additions & 4 deletions puppet.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('CFPropertyList', '~> 2.2')
end

if platform == 'x64-mingw32' || platform == 'x86-mingw32'
s.add_runtime_dependency('ffi', '1.15.5')
s.add_runtime_dependency('minitar', '~> 0.9')
end
if platform == 'x64-mingw32' || platform == 'x86-mingw32'
# ffi 1.16.0 - 1.16.2 are broken on Windows
s.add_runtime_dependency('ffi', '>= 1.15.5', '< 1.17.0', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2')
s.add_runtime_dependency('minitar', '~> 0.9')
end
end

0 comments on commit cc73049

Please sign in to comment.