You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few changes have been made to support runtime code reflection in a
cljs repl. These include small changes to cljs.analyzer, a separation of
the server element of cljs.repl.browser into cljs.repl.server, and the
addition of two new namespaces: cljs.repl.reflect (in src/clj) and
clojure.reflect (in src/cljs).
cljs.analyzer:
- Arbitrary metadata declared on symbols will now be added to the AST.
This supports the addition of docstrings.
- Fix a subtle bug in cljs.analyzer/analyze-file, where an uncommon
code-path would lead to the failed coercion of an absolute-path into a
URL. An absolute path, including a `file://` protocol, can now be
passed into the function successfully.
cljs.repl:
- Add function to analyze source on repl-env -setup. This is used to
support reflection on user-defined cljs source files, as well as to
populate the cljs.analyzer/namespaces atom on repl startup.
cljs.repl.browser:
- The server element of this namespace has been factored out into
cljs.repl.server to support other services that may require that
functionality.
cljs.repl.server:
- Expose a simple HTTP method and predicate dispatch system to register
handler functions for incoming requests. (Note: this system seems to
be relatively brittle, and future change may be warranted.)
cljs.repl.reflect:
- Registers a server handler for incoming requests to "/reflect".
- Queries cljs.analyzer/namespaces for meta information relevant to a
symbol, responding to requests with compiled javascript.
- Can use "fixed point" macroexpansion on cljs macro forms.
clojure.reflect:
- Expose a set of simple functions for querying meta information of a
symbol, as well as macroexpanding a cljs form.
0 commit comments