You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2010/04/02 12:54:27 UTC

[jira] Created: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

SLF4J dependency structure leads to unpleasant surproses
--------------------------------------------------------

                 Key: MAHOUT-361
                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
             Project: Mahout
          Issue Type: Bug
          Components: Clustering
    Affects Versions: 0.3
            Reporter: Benson Margulies


Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Drew Farris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852842#action_12852842 ] 

Drew Farris commented on MAHOUT-361:
------------------------------------

Sorry, I probably wasn't being clear; I'm not proposing we switch to the jcl (commons-logging) api. I think we should continue to use the slf4j api and continue to use the slf4j-jcl adapter. I do not think we should switch to use the jcl logging api.

So, it sounds like we are all in agreement, the only change that would need to be made to the existing core pom would be to remove the test scope for the slf4j-jcl adapter dependency. I'm unsure if there are issues with the other poms. Not in the position to look at this moment.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852795#action_12852795 ] 

Sean Owen commented on MAHOUT-361:
----------------------------------

Hoo boy, and we used to use JCL directly in 0.1. We come full circle. 

I still somehow favor sticking with SLF4J, mostly from inertia. But I dont' feel strongly.

But if we're dropping the meta-meta logger, why only drop down to meta-logger JCL? go all the way to JDK's logger. Hey, we already living in a situation where every major logger is used. Some of them have ways to redirect logging to other loggers. We can just use the most-primitive logger and let those who care redirect to JDK's logging?

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved MAHOUT-361.
------------------------------

    Fix Version/s: 0.4
       Resolution: Fixed

I didn't remove anything, just updated to slf4j 1.6 which should no-op by default.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Sean Owen
>             Fix For: 0.4
>
>         Attachments: MAHOUT-361.patch
>
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852965#action_12852965 ] 

Benson Margulies edited comment on MAHOUT-361 at 4/2/10 9:51 PM:
-----------------------------------------------------------------

Keep in mind that I got unhappy about this because some really not-very-loggy classes in collections now touch the slf4j API and demand a working config.

I see two plausible alternatives.

Alternative #1: remove the test scope. This requires non-JCL users to put some relatively fiddly stuff in their POM, but it avoids requiring everyone to pick one and add it. And the result works out-of-the-box. And for some people, jcl is good enough in terms of logging flexibility.

Alternative #2: rethink this.

2a: use java.util logging. Anyone who wants another backend can use the SLF4J technology.
2b: Borrow from CXF. CXF wanted to (a) support I18N and (b) avoid the situation we are in right now. So, they wrote their own simple logging wrapper. By default, it goes to j.u.l, but by putting a file in classpath you tell it to use some other logger. 

In short, they built a mini-SLF4J with two big differences: I18N and a working default configuration. Since that code is sitting in a nearby Apache project, we can pretty easily expropriate it.

      was (Author: bmargulies):
    Keep in mind that I got unhappy about this because some really not-very-loggy classes in collections now touch the slf4j API and demand a working config.

I see two plausible alternatives.

Alternative #1: remove the test scope. This requires non-JCL users to put some relatively fiddly stuff in their POM, but it avoids requiring everyone to pick one and add it. And the result works out-of-the-box. And for some people, jcl is good enough in terms of logging flexibility.

Alternative #2: rethink this.

2a: use java.util logging. Anyone who wants another backend can use the SLF4J technology.
2b: Borrow from CXF. CXF wanted to (a) support I18N and (b) about the situation we are in right now. So, they wrote their own simple logging wrapper. By default, it goes to j.u.l, but by putting a file in classpath you tell it to use some other logger. 

In short, they built a mini-SLF4J with two big differences: I18N and a working default configuration. Since that code is sitting in a nearby Apache project, we can pretty easily expropriate it.
  
> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852970#action_12852970 ] 

Sean Owen commented on MAHOUT-361:
----------------------------------

How about removing logging statements from collections and math? seems too low level for logging, really.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852788#action_12852788 ] 

Sean Owen commented on MAHOUT-361:
----------------------------------

Yah in theory it's their project that should depend on an slf4j implementation, not Mahout. But that represents a gotcha, and, if you are right that their dependency will override (does it? because then two bindings are on the classpath? or if properly overridden, their "job" jars won't have our dependency?) then it's good. I like.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Ceki Gulcu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852992#action_12852992 ] 

Ceki Gulcu commented on MAHOUT-361:
-----------------------------------

FYI, it is likely that future SLF4J release will default to a nop implementation if no binding can be found, eliminating the need to bundle a binding that the user will potentially have to exclude.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies reassigned MAHOUT-361:
---------------------------------------

    Assignee: Benson Margulies

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853018#action_12853018 ] 

Benson Margulies commented on MAHOUT-361:
-----------------------------------------

That lone collections business is pretty silly, and removing it looks good. I'm not qualified to pass on the implications of de-logging some of the more complex math bits.



> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>         Attachments: MAHOUT-361.patch
>
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Drew Farris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852792#action_12852792 ] 

Drew Farris commented on MAHOUT-361:
------------------------------------

I've run into this too as a result of having the slf4j implementation in test scope. 

Can we consider continuing to use the jcl adapter instead of jdk14? 

A large number of Mahout's dependenices already use jcl for their logging. Using this adapter changing the logging behavior for mahout (and its dependencies) becomes as simple as adding log4j (or not) to the jars (as opposed to switching the jcl version of slf4j >and< adding log4j). Admittedly this a minor difference, but one less thing to change. The default behavior is to use jdk14 anyway. 

I propose that we remove the test scope from the slf4j-jcl adapter dependency and let it default to the compile scope. Benson, this should solve the issue too, correct? 

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853017#action_12853017 ] 

Benson Margulies commented on MAHOUT-361:
-----------------------------------------

Ceki, noop would be not as nice as j.u.l.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>         Attachments: MAHOUT-361.patch
>
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852971#action_12852971 ] 

Benson Margulies commented on MAHOUT-361:
-----------------------------------------

Well, OK, but if assembling a typical job still requires the user to pick and include an slf4j backend, I submit that it's not a great thing.


> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852965#action_12852965 ] 

Benson Margulies commented on MAHOUT-361:
-----------------------------------------

Keep in mind that I got unhappy about this because some really not-very-loggy classes in collections now touch the slf4j API and demand a working config.

I see two plausible alternatives.

Alternative #1: remove the test scope. This requires non-JCL users to put some relatively fiddly stuff in their POM, but it avoids requiring everyone to pick one and add it. And the result works out-of-the-box. And for some people, jcl is good enough in terms of logging flexibility.

Alternative #2: rethink this.

2a: use java.util logging. Anyone who wants another backend can use the SLF4J technology.
2b: Borrow from CXF. CXF wanted to (a) support I18N and (b) about the situation we are in right now. So, they wrote their own simple logging wrapper. By default, it goes to j.u.l, but by putting a file in classpath you tell it to use some other logger. 

In short, they built a mini-SLF4J with two big differences: I18N and a working default configuration. Since that code is sitting in a nearby Apache project, we can pretty easily expropriate it.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen updated MAHOUT-361:
-----------------------------

    Assignee: Sean Owen  (was: Benson Margulies)

Jake I kind of recall you didn't want these log statements removed. Am I right? If so, won't commit my attached patch which just removes collections/math logging.

But in any event looks like slf4j 1.6 is out which I believe defaults to a no-op implementation, so using that ought to rectify the original issue.

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Sean Owen
>         Attachments: MAHOUT-361.patch
>
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873039#action_12873039 ] 

Hudson commented on MAHOUT-361:
-------------------------------

Integrated in Mahout-Quality #32 (See [http://hudson.zones.apache.org/hudson/job/Mahout-Quality/32/])
    MAHOUT-361 -- just update to slf4j 1.6


> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Sean Owen
>             Fix For: 0.4
>
>         Attachments: MAHOUT-361.patch
>
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852793#action_12852793 ] 

Benson Margulies commented on MAHOUT-361:
-----------------------------------------

It's a little worse than 'override'. They must write a Maven 'exclude' clause into their dependency on Mahout, and then write a dependency for the back-end they want.

This is perhaps why some people are shy of using SLF4J as their direct logging API.

As per Drew, we could just make calls to JCL, and anyone who wants SLF4J (including us in tests or utilities) can use their bridge.

Actually, I meant to write jcl, not jdk14, so that proposal is fine with me.


> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-361) SLF4J dependency structure leads to unpleasant surproses

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen updated MAHOUT-361:
-----------------------------

    Attachment: MAHOUT-361.patch

This is what it looks like to remove logging from math and collections. It's something to consider separately from the main conversation. Since the module in question was math/collections, maybe this is a helpful step anyway. Fewer dependencies in core libraries are better. But does this lose anything valuable? I sense this is left over from Colt?

> SLF4J dependency structure leads to unpleasant surproses
> --------------------------------------------------------
>
>                 Key: MAHOUT-361
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-361
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.3
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>         Attachments: MAHOUT-361.patch
>
>
> Our poms declare a dependency on the slf4j core, but not on any of the implementation modules. Thus, if an unsuspecting user adds a dependency on our stuff, and runs, they get a exception from slf4j complaining that there's no implementation. I claim that it would be more better to declare a dependency on the JDK14 module, and those users who really care about using something else can exclude it and include their own. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.