-
Notifications
You must be signed in to change notification settings - Fork 38
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
utils/classes-on-classpath can return non-classes #105
Comments
Yeah, doesn't seem like there is an adequate way to remove those without hardcoding a blacklist. Let the issue stay open for the future. |
Isn't checking for a It's what I'm doing for the time being https://github.com/clojure-emacs/refactor-nrepl/blob/7cc8365fa910e74e4c6d2d85f4d3d11f8c7e6618/src/refactor_nrepl/ns/class_search.clj#L12-L24 , I still get plenty of results (Disclaimer: I don't know much about the Java module system, which perhaps has something to do here?) |
Hmm, I assumed that it would be too slow to do that for all the tenth of thousands of classes on the classpath. Apparently, that only adds ~60 ms for the 13000 classes I've just tested on. Looks acceptable, given that it is only done once. |
Want to make a PR? Or I can fix it later. |
Can do. I'm also waiting for a verdict on the current PR 🤝 |
Context
In refactor-nrepl I use
utils/classes-on-classpath
for building a certain feature.I do believe the issue is practical for Compliment users as well.
Brief
classes-on-classpath
can return classes that cannot be imported. They certainly look like classes, but they cannot beimport
ed into the environment, so they seem useless as completion candidates.Examples
Repro
I don't exactly know atm what these classes have in common, perhaps something comes to mind to you?
Cheers - V
The text was updated successfully, but these errors were encountered: