1. Meikel Brandmeyer
  2. j18n
Issue #1 invalid

stop using version range for clojure

Anonymous created an issue

The version range causes confusion for users when using j18n and a clojure jar build with mvn install from clojure master. See https://groups.google.com/d/msg/clojure/tkvD6VS2h9M/8-vDu9i0PAQJ and the followup messages for an example.

Comments (4)

  1. Meikel Brandmeyer repo owner

    Ok. Let's have a look.

    j18n specifies that it works with clojure 1.2 and later till 1.4 including. 1.5 is not released, yet. So j18n cannot give a guarantee that this version will work with 1.5. Hence it is excluded from the valid range. So far I cannot spot anything wrong with j18n.

    Now someone wants to use j18n with a clojure version outside this version range. The dependency management tool obviously noticed the problem and devised some conflict resolution strategy. Now undoubtedly this was done in a suboptimal way since the dependency management tool didn't tell the user about the fact. It could fail hard. Or at least give a warning.

        dependency:
    
           org.clojure:clojure:1.5.0-SNAPSHOT
    
        conflicts with:
    
           seesaw:seesaw:1.4.2
              => j18n:j18n:1.0.1
                    => org.clojure:clojure:[1.2,1.5)
    

    So far I cannot spot anything wrong with j18n.

    Then the developer goes on and tells the dependency management tool: “yeah, I know. But I know also that everything will work fine with the 1.5 SNAPSHOT. Don't care for j18n and go on.” He resolves the issue and can use the 1.5 SNAPSHOT. That is perfectly fine. So far I cannot spot anything wrong with j18n.

    Since nothing is broken, I'm not sure what I should fix.

    If something was to be fixed, then it would be the tooling. Not j18n.

  2. Raynes

    Everybody who previously used version ranges is moving off of them in light of a recent influx of users with problems. Your library is causing people problems. https://groups.google.com/d/msg/clojure/kzF5O0Yfdhc/mBHBG5pzTgMJ

    There has been tons people in the Clojure IRC channel as well as on the google groups with extremely obscure dependency problems that eventually get tracked down as an unnecessary version range (like this one) hidden deep down in a dependency tree. This is now so common in fact that Nelson Morris has posted a blog post encouraging people to abandon version ranges and explaining the reasons why you should: http://nelsonmorris.net/2012/07/31/do-not-use-version-ranges-in-project-clj.html

    Seesaw is a popular library. Lots of people are going to have these problems. This change would take all of 3 seconds to make and doing it would mean that a) newbies will have a much better starting user experience and b) a big load will be taken off of people on the Clojure IRC channel and google group who have to help users debug these silly version range issues.

    No, j18n is not broken, but we can't fix the tooling. What we can do is stop using things that cause the problems in the first place. The version range here is just not necessary. You can document which versions that your library works with by testing against those versions and/or announcing them in the README. This has become commonplace https://github.com/seancorfield/clj-time/blob/master/project.clj#L12-L17

  3. Log in to comment