Skip to content
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

Add workaround for TruffleRuby and do not use File::SHARE_DELETE #114

Conversation

andrykonchin
Copy link
Member

@andrykonchin andrykonchin commented Jan 9, 2025

Fix logger on TruffleRuby.

TruffleRuby is missing a File::SHARE_DELETE constant that is in logger since #102. It was fixed in the TruffleRuby trunk and will be released in the next version.

This proposed temporary workaround in logger is needed to make it work on the current TruffleRuby release.

TruffleRuby issue oracle/truffleruby#3745

@andrykonchin
Copy link
Member Author

Also are maintainers open to add TruffleRuby on logger's CI?

There is only one failing test now:

Failure: test_shifting_size_not_rotate_too_much(TestLogDevice):
  Expected file "/var/folders/zq/f3j1_0pn3x1c7j1mzhzkd6yc0000gn/T/d20250109-71843-655mt3/log.0" to be identical?(#<File:0x1368 path=/var/folders/zq/f3j1_0pn3x1c7j1mzhzkd6yc0000gn/T/d20250109-71843-655mt3/log>).
  <false> is not true.
...
.../logger/test/logger/test_logdevice.rb:439:in `block in test_shifting_size_not_rotate_too_much'
     436:         logdev1.write(message)
     437:         assert_file.identical?(log, logdev1.dev)
     438:         # NOTE: below assertion fails in JRuby 9.3 and TruffleRuby
  => 439:         assert_file.identical?(log + ".0", logdev2.dev)
     440:
     441:         logdev2.write(message)
     442:         assert_file.identical?(log, logdev1.dev)

@hsbt hsbt merged commit e9af529 into ruby:master Jan 10, 2025
27 checks passed
@andrykonchin andrykonchin deleted the ak/workaround-missing-SHARE_DELETE-on-truffleruby branch January 10, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants