Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

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

...

The ClojureScript analyzer delivers a lot of critical information that is often handled via vars and namespaces and the metadata attached to them. The ClojureScript compiler during the analysis phase puts this information into an atom - cljs.compiler/namespaces. In order to build robust analysis tools, i.e. a ClojureScript debugger, it would beneficial to put the missing information on the symbols stored in cljs.compiler/namespaces. Then tools can easily call functions like cljs.compiler/analyze-file and have cljs.compiler/namespace populated with data.

Currently useful information like :line, :file, :arglists are missing. We could put this information on the symbols stored in :defs for a namespace but that would be a bit too opaque. It would easier for human readability to put what is traditionally var metadata into the clj.compiler/namespaces atom directly.