Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed bug in trace-ns/untrace-ns macros. #2

Closed
wants to merge 1 commit into from

2 participants

@SteffenGlueckselig

Otherwise ClassNotFoundExceptions are thrown.

@SteffenGlueckselig SteffenGlueckselig Fixed trace-ns/untrace-ns macros.
Otherwise ClassNotFoundExceptions are thrown.
c40d2bb
@lprefontaine
Collaborator

Hi Steffen,

the unquote is required to macro expand the ns argument passed to the macro.
If not unquoted, the unit test will not even compile.

Can you provide more information about the context in which you ran into this problem ?
I would also suggest to use trace-ns* directly to toss the macro aside temporarily.
Just quote the name space argument when you call it. The macro is only syntactic sugar. trace-ns* does the
work.

Send extra info to lprefontaine@softaddicts.ca.

Pull requests are not accepted. If you want to contribute, you need to send a signed CA and get the
necessary accesses from Clojure core to contribute. This is why I am closing it. If you have further
problem, report them on the Clojure mailing list so everyone will hear about them.

Thank you,
Luc P.

@SteffenGlueckselig

Hi Luc,

of course you are right. I had a problem with that code at work - somehow fixed it - and tried to reproduce the change to the code at home, issuing the pull request (without running the tests).
I was wrong with my home-work.

Sorry for that - more diligence next time.

Best,
Steffen

@lprefontaine
Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2012
  1. @SteffenGlueckselig

    Fixed trace-ns/untrace-ns macros.

    SteffenGlueckselig authored
    Otherwise ClassNotFoundExceptions are thrown.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/clojure/clojure/tools/trace.clj
View
4 src/main/clojure/clojure/tools/trace.clj
@@ -299,7 +299,7 @@ such as clojure.core/+"
(defmacro trace-ns
"Trace all fns in the given name space."
[ns]
- `(trace-ns* ~ns))
+ `(trace-ns* ns))
(defn ^{:skip-wiki true} untrace-ns*
"Reverses the effect of trace-var / trace-vars / trace-ns for the
@@ -313,6 +313,6 @@ such as clojure.core/+"
(defmacro untrace-ns
"Untrace all fns in the given name space."
[ns]
- `(untrace-ns* ~ns))
+ `(untrace-ns* ns))
Something went wrong with that request. Please try again.