Commit 13efc9f
committed
Consider targets used for test discovery in dependency checking
Before, we did test discovery at runtime, but we now do it at
compile-time, for speed and to avoid having to serialize the analysis
information returned by the compiler bridge.
This commits marks targets used during test discovery as used, thereby
subjecting them to depednency checking. In most cases, this won't make a
difference as the target containing the implementation of the
SBT test interface is the same one that the target being built would've
depended on anyway.
One important thing to note is that this will break a property of our
dependency checker that's been thus-far guaranteed: that it only allows
a dependency to be in `deps` or not in `deps`. When we do
test discovery, iterate through a list of test "frameworks". If we find
a test framework in the classpath, we look for tests that use that
framework; otherwise, we don't. This means that, for example, if specs2
isn't on the classpath, but the target contains specs2 tests, the tests
will silently fail to execute.1 parent a11b1df commit 13efc9f
File tree
3 files changed
+41
-25
lines changed- src/main/scala/higherkindness/rules_scala
- common/sbt-testing
- workers/zinc/compile
- tests/test-frameworks/mixed
3 files changed
+41
-25
lines changedLines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
18 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
19 | 37 | | |
20 | 38 | | |
21 | 39 | | |
| |||
Lines changed: 21 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| |||
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
285 | | - | |
| 291 | + | |
286 | 292 | | |
287 | 293 | | |
288 | 294 | | |
| |||
294 | 300 | | |
295 | 301 | | |
296 | 302 | | |
297 | | - | |
| 303 | + | |
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | | - | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
| |||
31 | 26 | | |
32 | 27 | | |
33 | 28 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 29 | | |
| 30 | + | |
39 | 31 | | |
40 | 32 | | |
41 | 33 | | |
| |||
0 commit comments