Support require outside of ns

Environment

None

Attachments

2
  • 30 Sep 2016, 09:57 PM
  • 30 Sep 2016, 08:32 PM

Activity

Show:

António Monteiro September 30, 2016 at 9:57 PM

Attached patch with `disallowing-ns*` instead of a `:top-level` in the analyzer environment.

António Monteiro September 30, 2016 at 8:32 PM

Attached patch with proposed implementation and tests.

David Nolen September 30, 2016 at 12:10 PM

Turns out we don't need custom resolution. Google Closure doesn't care if we add definitions to some other namespace.

David Nolen September 29, 2016 at 2:29 PM

This isn't just for scripts. There are other typical patterns that needs this like data literal files. Having a significant difference from Clojure here when we can in fact largely close the gap is and has always been undesirable. The outlined plan does not introduce any significant complexity - with cljs.user subnamespaces (these should have stable names not random ones btw) + custom resolve for cljs.user vars we will produce code that is perfectly usable for both runtime dev and advanced compilation.

Completed

Details

Assignee

Reporter

Patch

Code and Test

Fix versions

Priority

Created July 18, 2015 at 6:15 PM
Updated September 30, 2016 at 10:14 PM
Resolved September 30, 2016 at 10:14 PM