klipse icon indicating copy to clipboard operation
klipse copied to clipboard

Strange errors with cljc files with macros

Open txus opened this issue 9 years ago • 2 comments

I'm having trouble using an external library with cljc files and macros. Klipse complains that a macro in one namespace doesn't exist in a file that contains a different namespace, which is non-sensical to point out (and yet true). Not sure what the issue is.

To reproduce:

http://app.klipse.tech/?cljs_in=(require%20%27%5Bcats.core%20%3Aas%20c%5D)%0A&external-libs=%5Bhttps%3A%2F%2Fraw.githubusercontent.com%2Ffuncool%2Fcats%2Fmaster%2Fsrc%5D

txus avatar Dec 16 '16 11:12 txus

The problem is that with self-host cljs, reader conditionals (.cljc files) always branch to :cljs. Int the cats repo, macros are defined under the :clj branch.

I've explained it on klipse wiki

One solution would be to move all the macros into a .clj file

Another intersting approach is exposed on twitter pointing to this gist

viebel avatar Dec 16 '16 13:12 viebel

@MuhammadHamzaChippa started working on this issue via WorksHub.

workshub[bot] avatar Dec 08 '21 14:12 workshub[bot]