Skip to content

Commit

Permalink
gnu: clojure-instaparse: Update to 1.4.12.
Browse files Browse the repository at this point in the history
This patch updates clojure-instaparse to 1.4.12. Due to the following AOT
related error I disabled AOT compilation for this package.

```
starting phase `build'
Execution error (IllegalArgumentException) at instaparse.auto-flatten-seq/fn$G (auto_flatten_seq.cljc:7).
No implementation of method: :conj-flat of protocol: #'instaparse.auto-flatten-seq/ConjFlat found for class: instaparse.auto_flatten_seq.AutoFlattenSeq
```

This seems to be a known issue with AOT compilation. The issue has been
discussed [1] and seems to be still an open issue.

[1] Engelberg/instaparse#85

* gnu/packages/clojure.scm (clojure-instaparse): Update to 1.4.12.
[arguments]: Add 'fix-import' phase.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
  • Loading branch information
r0man authored and civodul committed Jul 22, 2022
1 parent f65270c commit 666f12f
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions gnu/packages/clojure.scm
Original file line number Diff line number Diff line change
Expand Up @@ -411,23 +411,35 @@ lazy - should allow parsing and emitting of large XML documents")
(license license:epl1.0)))

(define-public clojure-instaparse
(let ((commit "dcfffad5b065e750f0f5835f017cdd8188b8ca2e")
(version "1.4.9")) ; upstream forget to tag this release
(let ((version "1.4.12"))
(package
(name "clojure-instaparse")
(version version)
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Engelberg/instaparse")
(commit commit)))
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"002mrgin4z3dqy88r1lak7smd0m7x8d22vmliw0m6w6mh5pa17lk"))))
"1xdiwsv1dc8mvrmvgs4xdqk3z6ddsammc6brhcb771yhimx8jjcr"))))
(build-system clojure-build-system)
(arguments
'(#:doc-dirs '("docs/")))
'(;; Disabled AOT, because of failing test: No implementation of
;; method: :conj-flat of protocol:
;; #'instaparse.auto-flatten-seq/ConjFlat found for class:
;; instaparse.auto_flatten_seq.AutoFlattenSeq
#:aot-exclude '(#:all)
#:doc-dirs '("docs/")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-import
(lambda _
(substitute*
"test/instaparse/defparser_test.cljc"
(("AssertionError")
"Exception")))))))
(synopsis "No grammar left behind")
(description
"Instaparse aims to be the simplest way to build parsers in Clojure.
Expand Down

0 comments on commit 666f12f

Please sign in to comment.