ClojureScript

Make macro loading of the 'ns form optional

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

When parsing the (ns ...) form it has the costly side effect of immediately require'ing all macro namespaces it finds. While this is nescessary for parsing the rest of the file it is not required when just parsing the ns form.

Tools should be able to disable the loading of the macros to allow faster inspection of the ns form without this side-effect.

In shadow-build I have a function which basically does what cljs.build.api/parse-js-ns does just for ClojureScript files, this function is slow initially and I'd like be able to delay the require of macro namespaces as they are not required when just looking at the ns form.

Activity

Hide
Thomas Heller added a comment -

Whoops, the first patch didn't come out right. Fixed.

Show
Thomas Heller added a comment - Whoops, the first patch didn't come out right. Fixed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: