<< Back to previous view

[MATCH-86] OrPattern (:or 1 2) cannot be aot-compiled Created: 01/Aug/13  Updated: 26/Sep/14  Resolved: 23/Sep/13

Status: Closed
Project: core.match
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Thomas Heller Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None

core.match 0.2.0-rc5


I have a match expression containing an (:or :x :y) and this seems to trip up AOT compilation when running "lein uberjar".

At least I get a

Exception in thread "main"
java.lang.IllegalArgumentException: No method in multimethod 'to-source' for dispatch value: class clojure.core.match.OrPattern

Works fine otherwise, just "lein uberjar" fails.

Comment by David Nolen [ 01/Aug/13 12:17 PM ]

hrm, I suspect that the Object multimethod cases are the source of the issue - these were eliminated from the group-pattern logic and many AOT issues evaporated. I'll think on this some.

Comment by David Nolen [ 23/Sep/13 7:56 PM ]

fixed, http://github.com/clojure/core.match/commit/ad7fa2097a1ed7f629f4d34a2c1e8d4a3af8eaa7

Comment by Anders Conbere [ 07/Apr/14 10:38 PM ]


Is it possible that this issues wasn't fixed by that commit?

I can reproduce on master by attempting to aot compile `clojure.core.match.test.core`. In fact, I can go back to when that commit was introduced and get the same error.

Steps to reproduce and patch to test with here: https://gist.github.com/aconbere/b9ce4b05b8bad1de6869

Comment by David Nolen [ 07/Apr/14 10:49 PM ]

AOT'ing tests adds more variables than I care to consider. Please demonstrate a reproducible bug in a minimal case, preferable a project that I clone and test against, thanks.

Comment by Zane Shelby [ 08/Apr/14 11:39 AM ]

Here's a Github project that reproduces the issue for me:


Comment by David Nolen [ 08/Apr/14 12:11 PM ]

That is not the latest version of core.match. Please demonstrate that 0.2.1 has the issue.

Comment by Ning Sun [ 21/Apr/14 6:08 AM ]

I'm using 0.2.1 and it's still broken.

@Zane, you can just update core.match to 0.2.1 in your project.clj

Comment by David Nolen [ 21/Apr/14 7:11 AM ]

I was able to determine that this was in fact still an issue and fixed it in master https://github.com/clojure/core.match/commit/23adaf466fd026f9d4a12443032037dfc006b901

Comment by Ning Sun [ 26/Sep/14 3:31 AM ]

Any chance to issue a release for this fix? Thanks!

Comment by David Nolen [ 26/Sep/14 6:10 AM ]

It's already in a release - 0.2.2

Generated at Wed Jan 17 05:31:04 CST 2018 using JIRA 4.4#649-r158309.