Commit 388f889
committed
staging: fix classpath discovery with sbt >= 1.3
This fixes the sbt-dotty/quoted-example-project scripted test after the
previous commit.
Getting a classpath from a classloader is impossible in general, so we
really shouldn't be relying on it, but I fixed the thing we currently
use to at least work with sbt >= 1.3, sbt now uses multiple layers of
classloaders so we have to recurse on the parent of the classloader to
find all the URLs.
I also made it more correct by not appending
System.getProperty("java.class.path") to the classpath, this is
incorrect in general and can lead to classpath pollution (e.g., when
launched from sbt where java.class.path will contain the jars used by
sbt itself, which might include a different version of scala-library
than the one we use).1 parent 6e0ec50 commit 388f889
1 file changed
+27
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
78 | 93 | | |
79 | 94 | | |
80 | 95 | | |
0 commit comments