Fork me on GitHub
#core-typed
<
2015-06-25
>
dialelo08:06:42

@ambrosebs: I'm trying to use core.typed with a project entirely written in .cljc files but when using check-ns from the REPL it looks for a .clj file

dialelo08:06:51

and doesn't find it

dialelo08:06:47

I'm using the latest release (0.3.0)

dialelo08:06:24

is support for reader conditionals planned?

dialelo08:06:38

I'd be happy to help to push it forward

ambrosebs09:06:47

dialelo: would like to see support ASAP, please open a JIRA ticket.

ambrosebs09:06:11

dialelo: probably a one-liner change in clojure.core.typed.analyze-clj

ambrosebs09:06:20

help appreciated

dialelo10:06:48

I did some research and included what I found in the ticket

dialelo10:06:07

feel free to change its priority

dialelo10:06:28

I'm trying to write a patch ATM

ambrosebs10:06:01

dialelo: awesome.

dialelo12:06:26

should .cljc files have preference over .clj files?

dialelo12:06:45

not sure how Clojure behves when finding duplicated files with .cljc and .clj extension, does any of them have preference over the other?

ambrosebs12:06:02

dialelo: I think the logic is in the implementation of clojure.core/load

ambrosebs12:06:09

dialelo: somewhere in clojure.lang.RT

dialelo13:06:53

the release notes for Clojure 1.7 says that the platform-specific file extension (.clj & .cljs) will be checked prior to .cljc

dialelo13:06:09

so I guess it makes sense for core.typed to have that same behaviour

ambrosebs13:06:35

dialelo: so both are checked?

dialelo13:06:02

in RT.load, .clj files are tried first; if they are not found .cljc is tried

ambrosebs13:06:33

yes copy that behaviour

ambrosebs13:06:14

.cljc are effectively ignored if .clj is present?

dialelo13:06:06

looks like it, they are only checked after finding out that the .clj file doesn't exist

txus13:06:37

Oh interesting

dialelo13:06:57

I found out that 0.6.1 of tools.analyzer.jvm is used, .cljc support landed recently and I guess it will go in the next release (0.6.8)

dialelo13:06:30

the reader works well since it accepts a :read-cond :allow option

dialelo13:06:08

but I'm getting exceptions from the analyzer due to not supporting .cljc in the version core.typed depends

ambrosebs13:06:28

dialelo: ah that makes sense

ambrosebs13:06:06

dialelo: there's a bit of work I need to do to update tools.analyzer

dialelo13:06:56

I understand, the patch for file resolution is quite trivial

dialelo13:06:18

it only affects how ns->file works and the options passed to the reader

dialelo13:06:05

should I attach it to the ticket for the time being and update it when the tools.analyzer work is done?

dialelo13:06:44

(running out of battery, hope I can find a plug in #C04V12NPC)

dialelo13:06:11

great, will attach as soon as I can plug my laptop

dialelo13:06:22

ambrosebs: thanks a lot for the patience and guidance simple_smile