-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating FFI support #1863
base: main
Are you sure you want to change the base?
Updating FFI support #1863
Conversation
Signed-off-by: John McCrae <mccrae@progress.com>
Signed-off-by: John McCrae <mccrae@progress.com>
Signed-off-by: John McCrae <mccrae@progress.com>
Signed-off-by: John McCrae <mccrae@progress.com>
Signed-off-by: John McCrae <mccrae@progress.com>
Signed-off-by: John McCrae <mccrae@progress.com>
Signed-off-by: John McCrae <mccrae@progress.com>
@johnmccrae looks like you still have the cookstyle load error due to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install_if
racc
if >= 3.3 ruby version.
Signed-off-by: John McCrae <john.mccrae@progress.com>
Signed-off-by: John McCrae <john.mccrae@progress.com>
Signed-off-by: John McCrae <john.mccrae@progress.com>
|
|
rescue LoadError | ||
puts "cookstyle gem is not installed. bundle install first to make sure all dependencies are installed." | ||
rescue LoadError => e | ||
puts e.message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed because other dependencies can break. In this case, racc
gem "base64" | ||
end | ||
install_if -> { Gem::Version.new("3.3").to_s >= (RUBY_VERSION).to_s } do | ||
gem "racc", "~> 1.8.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnmccrae this conflicts with the above racc
specification for 3.4. The install_if
ultimately acts as though the gem
command were evaluated at the top or group level for the purpose of recording the Gemfile.lock
.
Also the version should be the following (the .to_s
is unnecessary and breaks the comparison logic in certain scenarios such as (because string comparison instead of version comparison)
irb(main):011> Gem::Version.new("3.3").to_s >= "3.3.0".to_s
=> false
This should be the order of things (validated that RUBY_VERSION
first works)
install_if -> { RUBY_VERSION >= Gem::Version.new("3.4") } do
gem "base64"
end
install_if -> { RUBY_VERSION >= Gem::Version.new("3.3") } do
gem "racc", "~> 1.8.0"
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there should be Gemfile.lock
output that has racc
and base64
|
||
s.add_dependency "chef-config", ">= 14.12", "< 20" | ||
s.add_dependency "chef-utils", ">= 16.0", "< 20" | ||
s.add_dependency "ffi", "~> 1.9" | ||
s.add_dependency "ffi", ">= 1.15.5", "< 1.17.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably do #1866 first, I think.
Description
Ohai hasn't been updated in a bit. It's current dependency on a stale version of ffi is causing errors in Chef-19. We also needed to update the supported Ruby versions
Related Issue
Types of changes
Checklist:
Gemfile.lock
has changed, I have used--conservative
to do it and included the full output in the Description above.