-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
info op fails for cljs macro in aliased namespace #106
Comments
The suggested fix makes sense to me. I don't really remember why the code is written as it is, because I think we always submit the At any rate - PR welcome! |
Fortunately we should have good tests there so we might as well try. The tricky part of that piece of code is exactly ordering...hopefully this will not be one of those case where it breaks. |
I guess we didn't have a test for that particular problem, though. :-) |
Maybe we should add one? |
I will try to see if I can get back into this, this year was full for me 👶 |
Expected behavior
Given this
ns
, when I do an info op ons/keys
(a macro), it should return the macro metadata.Actual behavior
Instead, it returns nil. The info op works fine for functions like
s/explain
. It also works fine if I:refer
the macro explicitly.Steps to reproduce the problem
I think the above illustrates the steps needed to reproduce.
I believe the issue is here:
orchard/src/orchard/cljs/meta.cljc
Line 90 in 0768f8e
In my example,
macro-namespace
is never called, so the code instead looks for the macro inmy-ns.core
, where it doesn't exist. I took the naive approach of simply swapping the two arguments toor
and it seems to work for me. I can submit a pull request, but wanted to run it by you first to see if this solution even makes sense (I'm still fairly new to Clojure, and especially new to this codebase).Environment & Version information
Clojure version
1.10.0
Java version
openjdk 11.0.10
Operating system
Debian unstable
The text was updated successfully, but these errors were encountered: