ClojureScript

Self-host: Macro namespaces cannot be aliased

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: 1.7.145
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code and Test

Description

If, for example, you employ code like

(ns cljs.user (:require-macros [foo.core :as foo]))

you cannot successfully invoke macros in the foo.core namespace using the alias foo.

Will supply a battery of unit tests that exercise various ways in which you can make use of macros and in those tests, the ones involving alias will fail without the patch.

Activity

Hide
Mike Fikes added a comment -

Attached patch fixes things so you can use namespace aliases when invoking macros in bootstrapped ClojureScript.

Show
Mike Fikes added a comment - Attached patch fixes things so you can use namespace aliases when invoking macros in bootstrapped ClojureScript.
Hide
Andrea Richiardi added a comment -

I will try it in replumb for issue 108.

Show
Andrea Richiardi added a comment - I will try it in replumb for issue 108.
Hide
Mike Fikes added a comment -

CLJS-1521-2.patch contains the same content as CLJS-1521.patch but moves a form so it can be applied with the patch in CLJS-1515.

Show
Mike Fikes added a comment - CLJS-1521-2.patch contains the same content as CLJS-1521.patch but moves a form so it can be applied with the patch in CLJS-1515.
Hide
Andrea Richiardi added a comment - - edited

I applied the patch locally with replumb and I reciprocate the LGTM (while before it was failing).

...:~/git/replumb (cljs-1.7.202 $=)$ rlwrap lein node-repl
...
cljs.user=> (ns my.namespace (:require-macros [foo.bar.baz :as f]))
nil
my.namespace=> (f/mul-baz 10 20)
200
Show
Andrea Richiardi added a comment - - edited I applied the patch locally with replumb and I reciprocate the LGTM (while before it was failing).
...:~/git/replumb (cljs-1.7.202 $=)$ rlwrap lein node-repl
...
cljs.user=> (ns my.namespace (:require-macros [foo.bar.baz :as f]))
nil
my.namespace=> (f/mul-baz 10 20)
200
Hide
Nikita Beloglazov added a comment - - edited

This patch also fixes similar problem with (:require [foo.core :as foo :include-macros true]) described in https://groups.google.com/forum/#!topic/clojurescript/ya0-38K4WVU

Show
Nikita Beloglazov added a comment - - edited This patch also fixes similar problem with (:require [foo.core :as foo :include-macros true]) described in https://groups.google.com/forum/#!topic/clojurescript/ya0-38K4WVU

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: