core-typed

Typed Clojure, an optional type system for Clojure
2015-06-25T08:24:42.000209Z

@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

2015-06-25T08:24:51.000210Z

and doesn't find it

2015-06-25T08:25:47.000211Z

I'm using the latest release (0.3.0)

2015-06-25T08:32:24.000212Z

is support for reader conditionals planned?

2015-06-25T08:32:38.000213Z

I'd be happy to help to push it forward

2015-06-25T09:39:47.000214Z

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

2015-06-25T09:40:11.000215Z

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

2015-06-25T09:40:20.000216Z

help appreciated

2015-06-25T10:14:25.000217Z

done http://dev.clojure.org/jira/browse/CTYP-239

2015-06-25T10:14:48.000218Z

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

2015-06-25T10:15:07.000219Z

feel free to change its priority

2015-06-25T10:27:28.000220Z

I'm trying to write a patch ATM

2015-06-25T10:52:01.000221Z

dialelo: awesome.

2015-06-25T12:51:26.000222Z

should .cljc files have preference over .clj files?

2015-06-25T12:52:45.000223Z

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

2015-06-25T12:56:02.000224Z

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

2015-06-25T12:56:09.000225Z

dialelo: somewhere in clojure.lang.RT

2015-06-25T12:56:11.000226Z

IIRC

2015-06-25T13:00:53.000227Z

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

2015-06-25T13:01:09.000228Z

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

2015-06-25T13:01:35.000229Z

dialelo: so both are checked?

2015-06-25T13:01:40.000230Z

*loaded

2015-06-25T13:04:02.000231Z

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

2015-06-25T13:05:28.000232Z

got it

2015-06-25T13:05:33.000233Z

yes copy that behaviour

2015-06-25T13:05:46.000234Z

great!

2015-06-25T13:07:14.000235Z

.cljc are effectively ignored if .clj is present?

2015-06-25T13:12:06.000238Z

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

2015-06-25T13:14:24.000239Z

looks right

txus 2015-06-25T13:33:37.000240Z

Oh interesting

2015-06-25T13:45:57.000241Z

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)

2015-06-25T13:46:30.000242Z

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

2015-06-25T13:47:08.000243Z

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

2015-06-25T13:47:28.000244Z

dialelo: ah that makes sense

2015-06-25T13:48:06.000245Z

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

2015-06-25T13:48:56.000246Z

I understand, the patch for file resolution is quite trivial

2015-06-25T13:49:18.000247Z

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

2015-06-25T13:50:05.000248Z

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

2015-06-25T13:50:44.000249Z

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

2015-06-25T13:50:51.000250Z

sounds good

2015-06-25T13:52:11.000251Z

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

2015-06-25T13:52:22.000252Z

ambrosebs: thanks a lot for the patience and guidance :simple_smile:

2015-06-25T13:52:31.000253Z

thanks!