Skip to content

Switch to syslog gem#9109

Merged
headius merged 3 commits intojruby:masterfrom
headius:migrate_syslog_to_gem
Jan 29, 2026
Merged

Switch to syslog gem#9109
headius merged 3 commits intojruby:masterfrom
headius:migrate_syslog_to_gem

Conversation

@headius
Copy link
Member

@headius headius commented Dec 3, 2025

This PR will eventually switch us to the syslog gem, once our FFI-based version has been incorporated.

See ruby/syslog#1

@headius headius added this to the JRuby 10.0.3.0 milestone Dec 3, 2025
@headius headius force-pushed the migrate_syslog_to_gem branch from fec8748 to 0e32cd5 Compare December 3, 2025 05:40
@headius
Copy link
Member Author

headius commented Dec 3, 2025

Gem will be ready to release once ruby/syslog#28 merges. I will re-push this PR to switch to the gem at that point.

@headius
Copy link
Member Author

headius commented Dec 18, 2025

Still waiting on ruby/syslog#28.

@headius
Copy link
Member Author

headius commented Jan 28, 2026

Still waiting on ruby/syslog#28. @hsbt What can I do to help get a new syslog gem released?

@hsbt
Copy link

hsbt commented Jan 29, 2026

@headius
Copy link
Member Author

headius commented Jan 29, 2026

@hsbt Wonderful, thank you! I will release future version for JRuby changes as needed.

@headius headius marked this pull request as ready for review January 29, 2026 06:15
@eregon eregon mentioned this pull request Jan 29, 2026
@headius headius force-pushed the migrate_syslog_to_gem branch from 1040c5d to 49dcdd9 Compare January 29, 2026 14:15
@headius
Copy link
Member Author

headius commented Jan 29, 2026

This is ready to go.

@headius
Copy link
Member Author

headius commented Jan 29, 2026

Ok maybe not...

headius added a commit to headius/jruby that referenced this pull request Jan 29, 2026
The RubyGems we run at build time runs with JRuby 9.4, which causes
it to use properties from that version for things like gem paths
and extension directories. This is related to the extension
disabling change in jruby#8415 and causes the build-time
extension faking to use the wrong path. For example:

  .../gems/shared/extensions/universal-java-25/3.1.0

when it should be

  .../gems/shared/extensions/universal-java/3.4.0

The change here uses RubyGems' cross-compiling capability by
forcing a specific rbconfig.rb to be use, and additionally fakes
out the Ruby API version by setting @ruby_api_version on the Gem
module.

This was discovered while attempting to switch fully to the syslog
gem in jruby#9109, since as a bundled gem it will not be
activated unless we successfully fake-out the extension build.

See also this bug related to the resolv gem installing extensions:

* jruby#8649
@headius headius force-pushed the migrate_syslog_to_gem branch from 49dcdd9 to b5c84d2 Compare January 29, 2026 17:17
headius added a commit to headius/jruby that referenced this pull request Jan 29, 2026
The RubyGems we run at build time runs with JRuby 9.4, which causes
it to use properties from that version for things like gem paths
and extension directories. This is related to the extension
disabling change in jruby#8415 and causes the build-time
extension faking to use the wrong path. For example:

  .../gems/shared/extensions/universal-java-25/3.1.0

when it should be

  .../gems/shared/extensions/universal-java/3.4.0

The change here uses RubyGems' cross-compiling capability by
forcing a specific rbconfig.rb to be use, and additionally fakes
out the Ruby API version by setting @ruby_api_version on the Gem
module.

This was discovered while attempting to switch fully to the syslog
gem in jruby#9109, since as a bundled gem it will not be
activated unless we successfully fake-out the extension build.

See also this bug related to the resolv gem installing extensions:

* jruby#8649
It only defined constants from jnr-constants, which we can do in
Ruby.
Because of the issue described in an fixed by jruby#9197,
the fake-out of the syslog extension build fails. Because it was
being installed as a bundled gem rather than a default gem, and
RubyGems will not activate a gem whose extension has not been
built, this prevented syslog from being loadable.

The change here moves it to a default gem for now, so that it can
still be loaded from stdlib as well as being upgraded by users.

These changes should be reverted once the gem platform fix has
been merged.
@headius headius force-pushed the migrate_syslog_to_gem branch from b5c84d2 to 149de66 Compare January 29, 2026 17:48
@headius
Copy link
Member Author

headius commented Jan 29, 2026

I'll merge this now with syslog as a default gem. We need #9197 merged to move it (and any other ext gems) to bundled so they fake out the extension build with the correct path. The syslog move is in #9198.

@headius headius merged commit 467f7c3 into jruby:master Jan 29, 2026
75 of 77 checks passed
@headius headius deleted the migrate_syslog_to_gem branch January 29, 2026 23:38
headius added a commit to headius/jruby that referenced this pull request Feb 3, 2026
The RubyGems we run at build time runs with JRuby 9.4, which causes
it to use properties from that version for things like gem paths
and extension directories. This is related to the extension
disabling change in jruby#8415 and causes the build-time
extension faking to use the wrong path. For example:

  .../gems/shared/extensions/universal-java-25/3.1.0

when it should be

  .../gems/shared/extensions/universal-java/3.4.0

The change here uses RubyGems' cross-compiling capability by
forcing a specific rbconfig.rb to be use, and additionally fakes
out the Ruby API version by setting @ruby_api_version on the Gem
module.

This was discovered while attempting to switch fully to the syslog
gem in jruby#9109, since as a bundled gem it will not be
activated unless we successfully fake-out the extension build.

See also this bug related to the resolv gem installing extensions:

* jruby#8649
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.

2 participants