binding breaks in macros

Description

When creating a macro that results in a binding the name of the global bound variables resolves into namespace bound names - this breaks the assert in clojurescripts let code.

example (simplified):
(ns clgl.macros)
(defmacro with-gl [[gl prog] & body]
`(binding [gl ~gl prog ~brog] ~@body))

(ns clgl.core
(:require-macros [clgl.macros :as m]))
...
(with-gl [gl prog]
(do-something))

Environment

unimportant

Activity

Show:
David Nolen
November 20, 2011, 7:18 PM

I'm not sure I follow. What does gl and prog get namespaced to?

Jozef Wagner
January 9, 2012, 8:46 PM

I think he has a problem with

resolving into

when expanding macro, and this produces error in clojurescript (no such ns exists in cljs).

Solution is to use

instead of

inside macro.

So IMO this issue is not a CLJS defect and should be closed.

David Nolen
January 11, 2012, 5:20 AM

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

None

Priority

Major
Configure