Remove legacy recursive classpath implementation#5112
Conversation
030b1cd to
12c7fbd
Compare
|
The question here is: should we also get rid of |
|
I guess we will need a new implementation for Java >= 9 ... but whether the abstraction as given makes sense ... no idea. I'd probably remove it, and add a comment so that the person implementing Java 9 support is aware of it. |
12c7fbd to
dd3fa5b
Compare
dd3fa5b to
0f9a704
Compare
|
@lrytz I've hacked together happy path support Java 9 / Jigsaw based on this PR: https://github.com/scala/scala/compare/dd3fa5b...retronym:review/5112?expand=1 There is a backend crash in the REPL under power mode (see the commit comment for a transcript) that I don't understand. Might be worth a quick look to see if you can see what's going on. I would then vote to remove the unneeded abstraction layers, as it doesn't look like they are needed to support Jigsaw. |
|
@retronym Looks great! |
|
@soc Yeah, that would be ideal. |
I've pushed a fix to my branch, it was a dumb mistake in my patch. |
|
Mhh, I thought they had published such a jar file ... I can't find it anymore. In the worst case the recommendation seems to be that the compiler loads jrt-fs.jar from a JDK9 installation. That might be annoying with the current tooling (but less annoying with the sbs tool I'm working on). |
|
Yes, found that, too. But that has the GPL license because it is just extracted from the OpenJDK repo. |
|
@lrytz I've updated my branch with my suggested refactorings to eliminate the now-unused abstraction between legacy and flat classpaths. I renamed This will require an patch to partest, which has a type alias to |
|
for partest: |
|
thanks for the follow-up work, great stuff! should I cherry-pick the last commit (5e07d57) and push it here? |
|
Yep, let's that would be good. Sorry I didn't leave a cleaner history, but it would be ideal to keep the Java 9 stuff as an separate commit (or maybe separate PR) |
|
allright thanks! think a separate PR for the Java 9 support would make sense - does it even compile on Java 8? you're not using any Java 9 API? |
|
On Java 8, you get a NIO exception when looking up the But regardless, a separate PR makes sense. |
ba6e71d to
371627f
Compare
371627f to
e5bf42b
Compare
|
@retronym should be ready now |
| override def classFileLookup: util.ClassFileLookup[AbstractFile] = settings.YclasspathImpl.value match { | ||
| case ClassPathRepresentationType.Recursive => platform.classPath | ||
| case ClassPathRepresentationType.Flat => platform.flatClassPath | ||
| } |
There was a problem hiding this comment.
All the classFileLookup methods should be reviewed and either removed or renamed to classPath.
Here's the commit that introduced them for a guide: 7448377
|
Aside from the |
e5bf42b to
30d6fce
Compare
|
ok, renamed |
|
LGTM, sorry about the slow final review. and thanks again for moving this forward! |
No description provided.