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

Hide FilenoUtil warning behind native.verbose property #7970

Merged
merged 1 commit into from Oct 26, 2023

Conversation

headius
Copy link
Member

@headius headius commented Oct 19, 2023

My goal with this warning was to avoid bug reports about native
process functionality not working well when running without the
module flags we need to dig up native file descriptors from Java
channels. Since I added this, however, many things have changed:

  • Native process IO does not go through Java channels anymore; it
    instead uses real native IO all the way through.
  • File IO now also usually goes through JNR using a native file
    descriptor.
  • The fileno extraction is now primarily used to provide a fileno
    for RubyIO objects, but most Ruby code will not need the real
    fileno.
  • Module flags are frequently difficult to inject into a jar-based
    usage of JRuby, so these flags may not be helpful anyway.

I believe a warning about degraded functionality is important, but
it should be at point-of-use rather than globally just in case the
native fileno functionality might become necessary in the future.
As such, I am hiding this global warning behind the native.verbose
property, and we can consider adding other more targeted warnings
going forward.

@headius
Copy link
Member Author

headius commented Oct 20, 2023

Unsure if I should remove this entirely or replace with some debug warning... @enebo?

My goal with this warning was to avoid bug reports about native
process functionality not working well when running without the
module flags we need to dig up native file descriptors from Java
channels. Since I added this, however, many things have changed:

* Native process IO does not go through Java channels anymore; it
  instead uses real native IO all the way through.
* File IO now also usually goes through JNR using a native file
  descriptor.
* The fileno extraction is now primarily used to provide a fileno
  for RubyIO objects, but most Ruby code will not need the real
  fileno.
* Module flags are frequently difficult to inject into a jar-based
  usage of JRuby, so these flags may not be helpful anyway.

I believe a warning about degraded functionality is important, but
it should be at point-of-use rather than globally just in case the
native fileno functionality might become necessary in the future.
As such, I am hiding this global warning behind the native.verbose
property, and we can consider adding other more targeted warnings
going forward.
@headius headius changed the title Remove inaccurate, annoying warning about native processes Hide FilenoUtil warning behind native.verbose property Oct 26, 2023
@headius
Copy link
Member Author

headius commented Oct 26, 2023

I modified this to hide the FilenoUtil warning behind the native.verbose property, since that property is intended to inform users about limitations in the native capabilities of JRuby. It will not print unless native.verbose is set.

@headius headius merged commit c63cb84 into jruby:master Oct 26, 2023
74 checks passed
@headius headius deleted the remove_fileno_warning branch October 26, 2023 19:37
headius added a commit to headius/polyglot-maven that referenced this pull request Nov 2, 2023
* mavengem 2.0.2
* jruby-maven-plugins 3.0.2
* jruby 9.4.5.0

Various fixes have come to JRuby since 9.4.3.0 but this is mainly
to eliminate a JPMS-related warning that prints at the beginning
of any build using polyglot-ruby or the JRuby/Maven stack.

See jruby/jruby#7970
cstamas pushed a commit to takari/polyglot-maven that referenced this pull request Nov 2, 2023
* mavengem 2.0.2
* jruby-maven-plugins 3.0.2
* jruby 9.4.5.0

Various fixes have come to JRuby since 9.4.3.0 but this is mainly
to eliminate a JPMS-related warning that prints at the beginning
of any build using polyglot-ruby or the JRuby/Maven stack.

See jruby/jruby#7970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant