librelist archives

« back to archive

Regression with 2.0.0-preview8 (was: [ANN] Leiningen 2.0.0-preview8 released)

Regression with 2.0.0-preview8 (was: [ANN] Leiningen 2.0.0-preview8 released)

From:
Tassilo Horn
Date:
2012-08-20 @ 20:53
Phil Hagelberg <phil@hagelb.org> writes:

Hi Phil,

> I'm happy to announce the release of Leiningen version 2.0.0-preview8.

I'm having a regression from preview7.  With that, my lein-html5-docs
plugin version 1.2.3 [1] worked just fine, but now with preview8, I get
the following error when running "lein html5-docs" on any project.

For example, if I run "lein html5-docs" in a new project just created
with "lein new foo", I get this error.

--8<---------------cut here---------------start------------->8---
Exception in thread "main" clojure.lang.LispReader$ReaderException: 
java.lang.RuntimeException: No reader function for tag ordered/map
	at clojure.lang.LispReader.read(LispReader.java:215)
	at clojure.core$read.invoke(core.clj:3346)
	at clojure.core$read.invoke(core.clj:3344)
	at clojure.main$eval_opt.invoke(main.clj:295)
	at clojure.main$initialize.invoke(main.clj:316)
	at clojure.main$null_opt.invoke(main.clj:349)
	at clojure.main$main.doInvoke(main.clj:427)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at clojure.lang.Var.invoke(Var.java:419)
	at clojure.lang.AFn.applyToHelper(AFn.java:163)
	at clojure.lang.Var.applyTo(Var.java:532)
	at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: No reader function for tag ordered/map
	at clojure.lang.LispReader$CtorReader.readTagged(LispReader.java:1164)
	at clojure.lang.LispReader$CtorReader.invoke(LispReader.java:1152)
	at clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:611)
	at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
	at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1069)
	at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
	at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
	at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
	at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
	at clojure.lang.LispReader.readDelimitedList(LispReader.java:1126)
	at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
	at clojure.lang.LispReader.read(LispReader.java:180)
	... 11 more
Subprocess failed
--8<---------------cut here---------------end--------------->8---

Depending on the projects I run "lein html5-docs" in, the message is a
bit different, but it's always about ordered-map, e.g., sometimes I get
similar errors like that:

  java.lang.IllegalStateException: Attempting to call unbound fn: 
#'ordered.map/ordered-map

The new foo project created from the templates surely doesn't have
tagged literals in the code, and neither does it have a dependency to
the ordered library.  So what's wrong here?

Bye,
Tassilo

[1] https://github.com/tsdh/lein-html5-docs

Re: [leiningen] Regression with 2.0.0-preview8

From:
Phil Hagelberg
Date:
2012-08-20 @ 23:17
Tassilo Horn <tsdh@gnu.org> writes:

>> I'm happy to announce the release of Leiningen version 2.0.0-preview8.
>
> I'm having a regression from preview7.  With that, my lein-html5-docs
> plugin version 1.2.3 [1] worked just fine, but now with preview8, I get
> the following error when running "lein html5-docs" on any project.
>
> Exception in thread "main" clojure.lang.LispReader$ReaderException: 
java.lang.RuntimeException: No reader function for tag ordered/map

We've been using ordered maps for repositories for a while now, but the
latest version of the ordered library started using tagged literals for
their representation. This has caused issues elsewhere as well.

The current plan is to switch to a vector of maps as the internal
representation for :repositories as per this thread:


http://librelist.com/browser/leiningen/2012/8/17/ordering-issues-with-repositories/

This could also break plugins as well if they rely on :repositories
being a map, but I believe in the long run it's a more sound solution.
Please let me know if you think this change would break your plugin.

-Phil

Re: [leiningen] Regression with 2.0.0-preview8

From:
Tassilo Horn
Date:
2012-08-21 @ 06:31
Phil Hagelberg <phil@hagelb.org> writes:

Hi Phil,

>> I'm having a regression from preview7.  With that, my lein-html5-docs
>> plugin version 1.2.3 [1] worked just fine, but now with preview8, I
>> get the following error when running "lein html5-docs" on any
>> project.
>>
>> Exception in thread "main" clojure.lang.LispReader$ReaderException:
>> java.lang.RuntimeException: No reader function for tag ordered/map
>
> We've been using ordered maps for repositories for a while now, but
> the latest version of the ordered library started using tagged
> literals for their representation. This has caused issues elsewhere as
> well.
>
> The current plan is to switch to a vector of maps as the internal
> representation for :repositories as per this thread:
>
> 
http://librelist.com/browser/leiningen/2012/8/17/ordering-issues-with-repositories/

Ah, interesting.  My plugin works with `eval-in-project` and at least
one project I want to call my plugin in uses clojure 1.4.0 and also uses
the ordered lib (1.3.2).  Shouldn't it work in that case?  I tried
making my plugin require ordered.map, but it doesn't seem to change
anything, i.e., I get the same error.

(defn html5-docs [project]
  (eval-in-project
   (update-in project [:dependencies]
              conj ['lein-html5-docs "1.2.3"])
   `(leiningen.html5-docs.core/html5-docs '~project)
   '(do
      (require 'ordered.map) ;; Make sure ordered.map is loaded.
      (require 'leiningen.html5-docs.core))))

> This could also break plugins as well if they rely on :repositories
> being a map, but I believe in the long run it's a more sound solution.
> Please let me know if you think this change would break your plugin.

No, my plugin doesn't rely on :repositories at all so it can be ordered
or not, a vector or a map, or whatever.

Thanks,
Tassilo