Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.match by

core.match clojurescript should be self-host compatible

9 Answers

0 votes
by

Comment made by: viebel

Basically what I did was to take match.clj from https://github.com/clojure/core.match/blob/master/src/main/clojure/clojure/core/match.clj

renamed in to match.cljc and make a branch for :cljs.

Patch is attached

0 votes
by

Comment made by: alexmiller

Please note that at the moment our automated CI build box is unable to build or release projects containing cljc files. I am actively working on fixing that but until it is, this can't move forward. (And after it's fixed, I would be happy to do so.)

0 votes
by

Comment made by: viebel

Anyway, I'd be happy to get feedback on my patch.
It's a lot of code dealing with the differences between cljs and clojure types.

0 votes
by

Comment made by: viebel

Now that cljc is fully supported, could someone take a look at this patch? Alex? David?

0 votes
by

Comment made by: alexmiller

The other question is whether we want to require Clojure 1.7 as a dependency for core.match, which means removing a lot of older versions from support. I think I'm ok with that, but would like to hear more from community too.

0 votes
by

Comment made by: cgrand

If the goal of this patch is only to make {{cljs.core.match}} self-host compatible (and not to also unify {{cljs.core.match}} and {{clojure.core.match}}) then I think there are several references to clojure that shouldn't be there and I also think that {{backtrack-expr}} and {{FailureNode}} emit clojure code instead of clojurescript code when run in clojure-compiled clojurescript.

0 votes
by

Comment made by: alexmiller

(link: ~viebel) please see Christophe's comments. I'd be happy to help shepherd this into a release if others could get to a point where it has a patch that works on Clojure, ClojureScript, and self-hosted ClojureScript.

0 votes
by
Reference: https://clojure.atlassian.net/browse/MATCH-116 (reported by viebel)
...