Bug 1317551

Summary: jline should OSGi export jline.internal for logging API
Product: [Fedora] Fedora Reporter: Severin Gehwolf <sgehwolf>
Component: jlineAssignee: Severin Gehwolf <sgehwolf>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jerboaa, mat.booth, mizdebsk, msimacek, omajid
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jline-2.13-3.fc24, jline-2.13-3.fc25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-16 10:07:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Proposed fix. mizdebsk: review+

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.