Skip to content

0.4.0

Compare
Choose a tag to compare
@darwin darwin released this 17 May 21:41
· 3363 commits to master since this release

ClojureScript code completion

The main feature of this release is added support for ClojureScript auto-completions in the REPL similar to suggestions in Javascript console. The auto-completion subsystem offers completions for cljs.core, your current namespace symbols, all known namespace names and locals in current scope (if paused on a breakpoint). In case you enter a name followed by slash, it attempts to offer completions for selected namespace. The namespace js/ is handled specially and falls back to standard Javascript auto-completion functionality.


Please note that code-completion subsystem does not depend on nREPL. It reads all the info client-side from DevTools / Chrome state. It heavily depends on source maps. It should always reflect your runtime state in the browser, not necessarily your REPL environment. It also supports live code reloading (e.g. Figwheel).

Locals work as expected

I did some effort to extract information about locals in current scope (when paused on a breakpoint). Newly I send this info to nREPL alongside with code to be evaluated. ClojureScript compiler can then use this info to resolve local names. This means that when paused on a breakpoint you can naturally use ClojureScript names you see in the scope pane and you don't have to escape to js/ lands to eval locals.

Silenced warnings

I decided to silence Use of undeclared Var... and No such namespace... compiler warnings. They just inform you that the code might not compile properly because you don't have loaded namespace code into your nREPL environment. In most cases compilation produces proper Javascript code which executes as expected. This can be set in Dirac runtime settings and you can re-enable it on per-project basis or globally via an environmental setting.

Agent works under Clojure 1.7 again

In previous release I have unintentionally used some library functions avail only since Clojure 1.8. This broke the Dirac Agent for people with older Clojure.

DevTools

Embedded DevTools rolled to 75893a0 which should work best with Chrome ~ 52.0.2739.0.

Notable commits

bf989e7 runtime: try to determine the runtime tag from folder name as well
bf151ee devtools: display runtime tag in dirac title if avail
94d7f4d project: run backend tests against Clojure 1.7 as well
2a3a62c nrepl: teach piggieback to pass :locals into cljs.repl/evaluate-form
a9f5d1c implant: upgrade parinfer to 1.8.1-0
cf3c6c5 devtools: introduce dirac APIs for extracting auto-completion symbols
e67258f devtools: teach dirac prompt to offer auto-completion suggestions
222f867 runtime: silence "Use of undeclared Var ..." warnings by default
b6ec732 runtime: silence "No such namespace ..." warnings by default
f1426fe devtools: support figwheel workflows for code completion
58f0cd9 devtools: gray out aliased names in completion suggestions box