Bug 1317551 - jline should OSGi export jline.internal for logging API
Summary: jline should OSGi export jline.internal for logging API
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: jline
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Severin Gehwolf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-14 14:18 UTC by Severin Gehwolf
Modified: 2016-03-16 10:07 UTC (History)
5 users (show)

Fixed In Version: jline-2.13-3.fc24, jline-2.13-3.fc25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-16 10:07:42 UTC
Type: Bug


Attachments (Terms of Use)
Proposed fix. (2.29 KB, patch)
2016-03-14 15:19 UTC, Severin Gehwolf
mizdebsk: review+
Details | Diff

Description Severin Gehwolf 2016-03-14 14:18:28 UTC
Description of problem:
Upstream recommends users to use internal API for configuring logging:
https://github.com/jline/jline2/wiki/Logging-Configuration

However, the Fedora package does not export the jline.internal package. The name "internal" suggests that it's not supposed to be exported, but then again it mentions how to use the Log API on it's wiki.

We've raised this issue upstream:
https://github.com/jline/jline2/issues/232

Until then it makes probably sense to export the internal package.

Version-Release number of selected component (if applicable):
jline-2.13-2.fc24

How reproducible:
100%

Steps to Reproduce:
$ rpm -qf /usr/share/java/jline/jline.jar
jline-2.13-1.fc23.noarch
$ bnd print /usr/share/java/jline/jline.jar
[...]
Export-Package
  jline                                  {version=2.13.0}
  jline.console                          {version=2.13.0}
  jline.console.completer                {version=2.13.0}
  jline.console.history                  {version=2.13.0}

Actual results:
Unresolved bundle errors for OSGi software using jline.internal.Log.

Expected results:
No OSGi resolution problems.

Comment 1 Severin Gehwolf 2016-03-14 15:19:03 UTC
Created attachment 1136192 [details]
Proposed fix.

Comment 2 Mikolaj Izdebski 2016-03-14 17:49:50 UTC
Comment on attachment 1136192 [details]
Proposed fix.

Patch looks good to me.

Comment 3 Severin Gehwolf 2016-03-14 18:01:32 UTC
Thanks for the patch review, Mikolaj.

I'm on the fence about pushing this though. On the one hand it would be closer to upstream's jars from maven central which are exporting jline.internal. On the other hand, the comment in [1] seems to suggest that one should use JUL logging via jline config and then silence the JUL log messages.

Since it should not do much harm I'll probably push it tomorrow.

[1] https://github.com/jline/jline2/issues/232

Comment 4 Omair Majid 2016-03-14 22:23:54 UTC
I posted a patch upstream to avoid using jline's internal API and to use JUL instead: http://icedtea.classpath.org/pipermail/thermostat/2016-March/018167.html

Comment 5 Severin Gehwolf 2016-03-16 10:07:42 UTC
I've pushed the patch and build in koji so as to be more in line with upstream.


Note You need to log in before you can comment on or make changes to this bug.