Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1930

Relax ruby facter ffi constraint for ruby 2.6

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 2.5.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      PR - 2019-07-10, PR - 2019-07-23
    • QA Risk Assessment:
      Needs Assessment

      Description

      If you try to bundle install puppet on ruby 2.6 on Windows, it will fail because the windows facter gem is constrained to:

      if RUBY_VERSION < '2.0.0'
        gem 'ffi', '<= 1.9.14', :require => false
      else
        gem 'ffi', '~> 1.9.18', :require => false
      end
      

      But ffi 1.9.x doesn't support ruby 2.6, as it was added in 1.10.0.

      We should relax facter's ffi dependency. The safest thing is to only relax the ffi dependency when running on ruby 2.6 or greater:

      if RUBY_VERSION.to_f < 2.0
        gem 'ffi', '<= 1.9.14', :require => false
      elsif RUBY_VERSION.to_f < 2.6
        gem 'ffi', '~> 1.9.18', :require => false
      else
        gem 'ffi', '~> 1.10.0', :require => false
      end
      

      /cc Ethan Brown, Mihai Buzgau

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              josh Josh Cooper
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support