Skip to content
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

auto-completion breaks after moving to a new namespace on a CLJS REPL. #1489

Closed
crocket opened this issue Dec 27, 2015 · 10 comments
Closed

auto-completion breaks after moving to a new namespace on a CLJS REPL. #1489

crocket opened this issue Dec 27, 2015 · 10 comments
Assignees

Comments

@crocket
Copy link

crocket commented Dec 27, 2015

After launching a CLJS REPL, auto-completion works well.
But, after moving to a new namespace with such a command as (ns something.core), auto-completion breaks for many namespaces.

@bbatsov
Copy link
Member

bbatsov commented Dec 27, 2015

Are we talking about built-in auto-completion or some third-party package?

@crocket
Copy link
Author

crocket commented Dec 27, 2015

What do you mean by third-party package? You can use https://github.com/crocket/nrepl-figwheel-node-template to reproduce the issue.

Execute my template, and type

(doc doc) ENTER
(ns <<project-name>>.core) ENTER
(cljs.repl/ TAB

I should be able to see cljs.repl/doc and so on, but I only see cljs.repl/print-doc.

@bbatsov
Copy link
Member

bbatsov commented Dec 27, 2015

Third-party completion package - auto-complete-mode, company-mode, etc

@crocket
Copy link
Author

crocket commented Dec 27, 2015

Nope, I reproduced the issue on nrepl-figwheel-node-template without any third party auto-completion package.

@bbatsov
Copy link
Member

bbatsov commented Dec 27, 2015

@cichli Can you take a look at this, please?

@crocket
Copy link
Author

crocket commented Dec 27, 2015

According to my test,

  • After pressing C-c M-n in a cljs file, only cljs.repl/print-doc is displayed in auto-completion of cljs.repl/.
  • After executing (ns something.core), only cljs.repl/print-doc is displayed in auto-completion of cljs.repl/.
  • After executing (ns something.core (:use-macros [cljs.repl :only [doc]])), cljs.repl/ TAB displays the full content of its namespace.

@cichli
Copy link
Member

cichli commented Dec 27, 2015

Including conversation from Slack for more context:

cichli [2:07 PM] 
Thanks, that's enough for me to replicate - I'll take a look this evening :simple_smile:

​[2:08] 
I ​_think_​ the first two examples are expected; `cljs.repl` is only automatically required in the `cljs.user` namespace

crocket [2:09 PM] 
So, what is wrong?

cichli [2:09 PM] 
But the latter sounds like either a bug in the CLJS autocompletion code, or possibly a bug in the CLJS compiler itself (can you successfully use any of the macros in `cljs.repl` that you ​_didn't_​ specifically impot?)

​[2:10] 
Oh, I see, you're still seeing `print-doc` in the completions for the first two cases

crocket [2:11 PM] 
@cichli: I can execute `(cljs.repl/source cljs.repl/doc)` after executing `(ns hello-world.test (:use-macros [cljs.repl :only [doc]]))`.

​[2:11] 
Macros are only not available for auto-completion, but they are always there.

​[2:12] 
Even after `(ns something.core)`, `cljs.repl/doc`, `cljs.repl/source`, etc are available for invocation. But, they are not available for auto-completion.(edited)

cichli [2:13 PM] 
Gotcha, thanks

​[2:13] 
This issue might be specific to `cljs.repl`, so we might just have to special-case that. I'll see if the issue occurs for other macro namespaces

@stale
Copy link

stale bot commented May 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale label May 8, 2019
@bbatsov
Copy link
Member

bbatsov commented May 14, 2019

@arichiardi Can you look into this?

@stale stale bot removed the stale label May 14, 2019
@vemv
Copy link
Member

vemv commented Aug 24, 2023

Probably this hasn't been the case for a long while.

@vemv vemv closed this as completed Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants