clj-tagsoup icon indicating copy to clipboard operation
clj-tagsoup copied to clipboard

Fails with Clojure 1.10.1

Open robbieh opened this issue 4 years ago • 4 comments

If I update my Clojure dependency from 1.6.0 to 1.10.1, clj-tagsoup no longer works.

From the repl, I get the following when trying to :require tagsoup:

CompilerException java.lang.Exception: namespace 'clojure.data.xml' not found, compiling:(pl/danieljanus/tagsoup.clj:1:1)

From my test cases, I get:

In: [1 0] val: {:keys (attrs)} fails spec: :clojure.core.specs.alpha/arg-list at: [:args :bs :arity-n :bodies :args] predicate: vector?
In: [1 0] val: ({:keys (attrs)} writer) fails spec: :clojure.core.specs.alpha/arg-list at: [:args :bs :arity-1 :args] predicate: (cat :args (* :clojure.core.specs.alpha/binding-form) :varargs (? (cat :amp #{(quote &)} :form :clojure.core.specs.alpha/
binding-form))),  Extra input                           
 #:clojure.spec.alpha{:problems ({:path [:args :bs :arity-1 :args], :reason "Extra input", :pred (clojure.spec.alpha/cat :args (clojure.spec.alpha/* :clojure.core.specs.alpha/binding-form) :varargs (clojure.spec.alpha/? (clojure.spec.alpha/cat :amp #
{(quote &)} :form :clojure.core.specs.alpha/binding-form))), :val ({:keys (attrs)} writer), :via [:clojure.core.specs.alpha/defn-args :clojure.core.specs.alpha/args+body :clojure.core.specs.alpha/arg-list :clojure.core.specs.alpha/arg-list], :in [1 0
]} {:path [:args :bs :arity-n :bodies :args], :pred clojure.core/vector?, :val {:keys (attrs)}, :via [:clojure.core.specs.alpha/defn-args :clojure.core.specs.alpha/args+body :clojure.core.specs.alpha/args+body :clojure.core.specs.alpha/args+body :clo
jure.core.specs.alpha/arg-list :clojure.core.specs.alpha/arg-list], :in [1 0]}), :spec #object[clojure.spec.alpha$regex_spec_impl$reify__2436 0x79a1728c "clojure.spec.alpha$regex_spec_impl$reify__2436@79a1728c"], :value (write-attributes [{:keys (att
rs)} writer] (doseq [[k v] attrs] (if (namespace k) (.writeAttribute writer (str (namespace k)) (name k) (str v)) (.writeAttribute writer (name k) (str v))))), :args (write-attributes [{:keys (attrs)} writer] (doseq [[k v] attrs] (if (namespace k) (.
writeAttribute writer (str (namespace k)) (name k) (str v)) (.writeAttribute writer (name k) (str v)))))}, compiling:(clojure/data/xml.clj:30:1)

test.txt

robbieh avatar May 04 '20 03:05 robbieh

Thanks for the report! A PR that should fix this has been recently merged and a clj-tagsoup 0.3.1 should be out soon.

nathell avatar May 04 '20 16:05 nathell

Sounds good. Thank you!

robbieh avatar May 04 '20 23:05 robbieh

Hi there, I'm getting the same issue. Are there still plans for a 0.3.1? Thank you!

l-acs avatar Oct 21 '20 18:10 l-acs

Workaround here https://github.com/nathell/clj-tagsoup/pull/22#issuecomment-577764953

:dependencies [[org.clojure/data.xml "0.0.8"]
               [clj-tagsoup "0.3.0" :exclusions [org.clojure/data.xml]]]

lfilatova avatar Oct 28 '20 20:10 lfilatova