fileutils icon indicating copy to clipboard operation
fileutils copied to clipboard

EOPNOTSUPP added to 1.4.1 in CRuby but not released as 1.4.2

Open headius opened this issue 4 years ago • 9 comments

The following commit added an additional rescue for EOPNOTSUPP: https://github.com/ruby/fileutils/commit/4c4edf49150725d71534c8fe04274a2427b7c5fa

This appears to have been applied directly to CRuby's copy of fileutils.rb, resulting in the shipped version of fileutils there not corresponding to any released gem: https://github.com/ruby/ruby/commit/a19228f878d955eaf2cce086bcf53f46fdf894b9

This prevents JRuby from shippinga matching fileutils, since we source all gem-based libraries from the released gems. Currently we are shipping with fileutils 1.4.1, which is what Ruby 2.6.8 reports that it ships, but this change is present in Ruby 2.6.8 and does not exist in the 1.4.1 gem.

Either a 1.4.2 gem should be released based on the CRuby sources, or CRuby should be updated to a version of fileutils.rb that matches a released gem version (like 1.5.0, which appears to be where this commit was first released).

Alternatively, if it seems safe, we could ship JRuby 9.3 (equivalent to Ruby 2.6.8) using the newer fileutils 1.5.0.

headius avatar Sep 02 '21 19:09 headius

@shyouhei Could you help me figure out how to resolve this difference? This was your commit that went into CRuby's ruby_2_6 branch but the version of fileutils there was not updated.

headius avatar Sep 02 '21 19:09 headius

Hi @headius! It is unfortunate that the two are out of sync. Timeline is:

  • fileutils 1.4.1 was released.
  • I pushed commit https://github.com/ruby/ruby/commit/a19228f878d955eaf2cce086bcf53f46fdf894b9 to 3.0 (then master)
  • @unak, 2.6 branch maintainer, eventually backported it due to https://bugs.ruby-lang.org/issues/16979. https://github.com/ruby/ruby/commit/82019f272dff1990e7a273125a8414d056f6306d
  • Ruby 2.6.8 is released.

So given the actual bug report and the decision of branch maintainer, I guess the intention was to have a corresponding gem version.

shyouhei avatar Sep 03 '21 01:09 shyouhei

Let me ask others about it in the next dev meeting!

shyouhei avatar Sep 03 '21 02:09 shyouhei

@shyouhei Thank you! We will need to address this in JRuby soon, so either we'll need that 1.4.x release or we'll need to use a newer fileutils in our release than Ruby 2.6.8 ships.

headius avatar Sep 03 '21 02:09 headius

@shyouhei Any news? We have run out of time for 9.3, so we may have to update to a newer FileUtils that includes the patch, even though it won't match Ruby 2.6.8.

headius avatar Sep 10 '21 15:09 headius

Hi. Sorry for our being slow. We are going to discuss this issue on this Thursday.

shyouhei avatar Sep 13 '21 07:09 shyouhei

@shyouhei Could you help me figure out what version we could ship with if no 1.4.2 is released in time? Would you expect that the newest fileutils would be ok to ship in a Ruby 2.6.8-compatible JRuby or should we try to keep it closer to 1.4.1?

headius avatar Sep 13 '21 15:09 headius

Looking at git diff output, it seems differences are mostly test improvements. However production code does differ apart from the EOPNOTSUPP hunk. My gut feeling is the newest version (works but) is not 2.6.8 compatible. If I were to decide I would stick to 1.4.1.

shyouhei avatar Sep 14 '21 01:09 shyouhei

I would like to understand what the policy is for these key standard library gems.

Ruby 2.6.8 was released less than three years ago. Many users take up to a year to upgrade, which means there are likely users out there with 2.6.8 apps that are less than two years old.

If the newest fileutils is indeed incompatible, that seems like a big problem for anyone maintaining an app that still uses 2.6.8.

Regardless, if no 1.4.2 is released before we need to close the door on JRuby 9.3, we will just stick with 1.4.1. Thanks for the help!

headius avatar Sep 14 '21 15:09 headius

@headius ping. Can I help this?

hsbt avatar Feb 08 '23 06:02 hsbt

@hsbt I believe there's nothing else to be done here.

JRuby 9.3 (which is in maintenance mode now) will stick with fileutils 1.4.1 and going forward I think you will be keeping the gems in sync with the MRI repository.

headius avatar Feb 08 '23 11:02 headius

@hsbt Actually, perhaps we could release the fileutils from Ruby 2.6.8 as 1.4.2? Then we would really be able to put this issue to rest. I will prepare a PR.

headius avatar Feb 08 '23 11:02 headius

Ok I started looking at porting over the fileutils.rb from Ruby 2.6.10 and there are a LOT of changes, but it claims to be version 1.1.0.

This is all very confusing. I would like to be able to include the same fileutils in JRuby 9.3.11 that was shipped in 2.6.10 but that version does not exist in any released version of the fileutils gem.

headius avatar Feb 08 '23 12:02 headius

@headius I create https://github.com/ruby/fileutils/tree/ruby-2-6-fileutils as syncing ruby_2_6 branch of ruby/ruby. It's completely same file from released version of Ruby 2.6.

So, I can release this as 1.1.0.1 or 1.1.1. But There is no chance to bump version on ruby_2_6. I'll follow this issue with your request.

hsbt avatar Feb 16 '23 05:02 hsbt