Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

core.typed works best at namespace granularity. When CCW has a namespace open, there should be a button that calls "check-ns" on this namespace.

LAP: it is definitely possible and probably quite easy to add a new command possibility (via keyboard shortcut, and contextual menu) for invoking some core.typed command, using the current active repl *if we find some core.typed marker namespace in the repl's classpath* and giving it the namespace name corresponding to the editor tab having the focus.

core.typed throws a clojure.lang.ExceptionInfo, accompanied by errors like:

...

CCW should present these errors to the user in the typical Eclipse fashion, with visual cues to the actual error source. Usually line and column number is provided.

LAP: would the only option available to parse the output printed? Seems a little bit fragile. Could there be a command returning a tiny datastructure: \[ \{ :filename "/home/lpetit/.../my_namespace.clj", :line 1234, :description "here the usual text", :summary "condensed version for quick single-line display" \}, \{ ... another type error ... \} ... \]

There might be an option for automatic type checking along with compilation.

LAP: CCW does not compile those days (as in AOT compile), but does provide option to automatically reload the namespace. So this could probably be added as well, indeed (maybe not in a first version). The problem being, as usual, how (and should we) determine all other dependent namespaces that should be recompiled / rechecked (once we enter the "automatic" realm, users demands are high Smile )

Typed REPL

This is optional, but provide a REPL with the type checker always on. This would type check forms implicitly.

LAP: This could be an option. This would mean automatically encapsulating commands inside some core.typed call, right ?

Type queries

Hovering over locals could query core.typed for the type at particular positions. This could get complicated.

LAP: Let's save this for a later brainstorming.