samg / diffy

Easy Diffing in Ruby
http://rubygems.org/gems/diffy
MIT License
1.27k stars 104 forks source link

NameError: "uninitialized constant Diffy::Diff::Open3" on Windows #119

Closed avdv closed 2 weeks ago

avdv commented 2 years ago

Error message:

Failure/Error: difference = Diffy::Diff.new(actual_str, expected_str).to_s
     NameError:
       uninitialized constant Diffy::Diff::Open3
               diff, _stderr, _process_status = Open3.capture3(diff_bin, *(diff_options + @paths))
                                                ^^^^^
       Did you mean?  OpenSSL
     # ./vendor/bundle/ruby/3.1.0/gems/diffy-3.4.2/lib/diffy/diff.rb:52:in `diff'
     # ./vendor/bundle/ruby/3.1.0/gems/diffy-3.4.2/lib/diffy/diff.rb:83:in `each'
     # ./vendor/bundle/ruby/3.1.0/gems/diffy-3.4.2/lib/diffy/format.rb:23:in `to_a'
     # ./vendor/bundle/ruby/3.1.0/gems/diffy-3.4.2/lib/diffy/format.rb:23:in `text'
     # ./vendor/bundle/ruby/3.1.0/gems/diffy-3.4.2/lib/diffy/diff.rb:140:in `to_s'
     # ./spec/support/yaml_sort_checker.rb:45:in `different_from_yaml?'
     # ./spec/support/yaml_sort_checker.rb:38:in `value_sorted?'
     # ./spec/support/yaml_sort_checker.rb:17:in `sorted?'
     # ./spec/color_ls/yaml_spec.rb:20:in `block (4 levels) in <top (required)>'

I think this is related to this change: 478f392082b66d38f54a02b4bb9c41be32fd6593

Here's a test run where this fails after upgrading from 3.4.0 to 3.4.2: https://github.com/athityakumar/colorls/runs/7126221102?check_suite_focus=true

muellerj commented 2 weeks ago

I have run up against the same issue - is there any reason, why https://github.com/samg/diffy/pull/120 cannot be merged?

ErCargo commented 2 weeks ago

  您好,邮件已收到!

muellerj commented 2 weeks ago

Awesome, thank you. Let me know if/wheb you plan to release the next version so I can update my Gemfiles

samg commented 2 weeks ago

Released in https://rubygems.org/gems/diffy/versions/3.4.3. Thanks folks!