-
Notifications
You must be signed in to change notification settings - Fork 177
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
Filter non file urls from classpath response #667
Conversation
👍 I'll probably cut a new release in a week or so. |
Not all urls on a classpath are necessarily files. Eg. spring boot adds "jar:file:..." urls
Here we go |
[orchard.java.classpath :as cp] | ||
[orchard.misc :as misc])) | ||
|
||
(defn file-url? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, doesn't it make more sense for this to be in orchard
as well? Or at least a private function here?
(defn file-url? | ||
[u] | ||
(and (misc/url? u) | ||
(= (.getProtocol ^java.net.URL u) "file"))) | ||
|
||
(defn classpath-reply [msg] | ||
{:classpath (->> (cp/classpath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also been thinking we can just add a classpath-files
function to orchard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if that would filter out too much for other clients of orchard. Maybe some clients want to fix this problem instead of just removing the classpath entries which causes this function to fail. Would it not take that possibility from them if we filter on the orchard side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, adding the function there wouldn't mean that people are forced to use it. It simply seems to me like something that's generally useful outside cider-nrepl
.
Sorry for the late reply. Was busy the last two weeks |
Not all urls on a classpath are necessarily files. Eg. spring boot
adds "jar:file:..." urls
This can only be merged after clojure-emacs/orchard@9fe7a70 was released.
This is at least related to clojure-emacs/orchard#83