-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
"No definition found" on _some_ of my local CLJS requires #427
Comments
Hello, That sounds very strange. Have you loaded the file that requires these namespaces? |
Very strange indeed. Yes, I tried manually loading all those files/namespaces - both "requiring" and "required" - (using ctrl+alt+c Enter) switching to them etc. with no effect whatsoever. |
If you can cook a reproduction project that we can look at, that would great. |
Understood. If I find some spare time, I'll try to prepare something during the weekend. |
Hello. I guess I finally managed to reproduce the issue from scratch. It's quite simple, actually. Not sure if the behavior I'm going to describe is a feature or a bug, but for me it's confusing at least. So here we go (feel free to skip first 4 steps, the important stuff is in steps 6-8):
lein new re-frame dummy-project-reframe +cider +handler +10x +routes +test
cd dummy-project-reframe
code .
So it seems to me that there needs to be at least some What's funny is that when I register for example following subscription in (re-frame/reg-sub
::blahblahblah
(fn [db _]
(:blahblahblah db))) ... then later when editing Can this be improved somehow? |
Thanks for the detailed reproduction steps! This sounds like a bug in Calva, but I say so before having investigated it. Which I will do now. Cheers! |
Now I've had a look. Seems that the problem is in |
Added this issue on |
Can you test the issue with version 2.0.57 please?
The namespace And when I try to load either of the files I get the following error:
But this could be me not knowing what I do with shadow-cljs. |
Yeah, |
Top! |
Hi, I'd just like to ask what's the status of this issue right now. If I understood correctly, mentioned PR to Is there anything to be tested right now? |
Hmmm, not sure. Calva is using But, maybe first you can try this, @brdloush .
|
Very good idea @PEZ. I've tried what you described and it seems to work correctly. I can now navigate even to namespaces which have no fns/defs inside them. 👍 Great job everyone 👏, looking forward to see this in next version. |
Closing this since Calva now uses cider-nrepl 0.23.0 |
@bpringe I hoped you'd be on 0.25 by now. :-) |
I put it on our todo list 😄 - #852 |
Hello,
I'm using vs code 1.39 on linux, using extenstions calva 2.0.53, Clojure linter (Joker) 0.0.2 and Clojure Lint 0.5.0. Running simple learning/hacking reframe project based on reframe leiningen template (so combination of clj+cljs).
Running the project directly from vs code using calva's cider-jack-in (Leiningen + shadow-cljs):
I have following :require statements in my view.cljs file:
When I navigate to line with
events
namespace require, I'm able to either ctrl+click the link or press F12 andevents.cljs
file is opened. Correct behavior here. But I'm not able to do the same onsubs
namespace. It doesn't render as link when i ctrl-mouse-hover over it, and F12 keypress yields"No definition found for 'some-package-reframe.subs'"
message.It's really strange that some of my local namespaces works, some not. Mentioned
subs.cljs
file is happily sitting in the same directory asevents.cljs
.subs.cljs
file can be opened manually, loaded/evaluated etc. in the same way asevents.cljs
. No obvious difference in namespace definition. But it just doesn't want to be ctrl+clicked from other namespaces' require statements.Any hint regarding what to perform/check welcomed. Is there perhaps some debug-logging which might shed some more light on the issue?
The text was updated successfully, but these errors were encountered: