-
-
Notifications
You must be signed in to change notification settings - Fork 54
[java] Rework Java sources discovery #303
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
Conversation
cc1366e
to
9e63466
Compare
I totally agree on all points and the PR looks pretty good to me in its current state. Just a couple of small notes:
I guess us working in this direction originally is on me, as I thought it'd be easier to locate sources in this manner - I've learned my lesson since. 😅 |
(ns orchard.java.source-files | ||
"Contains functions for discovering Java source files that are already available | ||
on the REPL and for downloading sources from Maven." | ||
(:require [clojure.java.io :as io] |
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.
You might also want to add the usual namespace metadata here.
12f1a57
to
b7689b3
Compare
Updated the README as you requested and added ns meta. I'm not rushing to merge this, let it sit while I'm finding the bugs in practice (there should be some). |
eb1bb62
to
2702cbb
Compare
Btw, it's probably still worth mentioning |
True, I'll put it into the new Java sources README section. |
2702cbb
to
dab9a90
Compare
dab9a90
to
81176ff
Compare
81176ff
to
d7c5f02
Compare
OK, I used it for some time, and I'm now ready to merge. |
This is the first step – and a big one – in redoing Orchard's interaction with Java sources. It's kinda difficult to split it into smaller chunks, so I'm going to explain the changes below.
-sources.jar
JARs that can be downloaded from Maven. Getting them from Maven is kind of complicated – that's whyenrich-classpath
exists. But once they are downloaded, we can again locate them on the disk without having to bring them onto the classpath.orchard.java.source-files
currently contains code that sources for those source archives and JARs. It replaces the current approach of only callingio/resource
to search for Java source files. In the future, this namespace might also enable the downloading of JARs somehow (e.g., by calling an external process), but it already brings certain value as is.I'm going to test-drive these changes for a while.