mirror of https://github.com/sbt/sbt.git
Refine `source-dependencies/import` test.
Clarify what `source-dependencies/import` really tests by renaming it to `source-dependencies/import-package` which better describes the scope of that test. Also, introduce analogous `source-dependencies/import-class` test which tests dependency tracking on imported classes. The reason why we should distinguish between imported packages and classes is that incremental compiler doesn't track packages as products of source files as it does for classes. Therefore, problem with imported classes is much more tractable than with imported packages.
This commit is contained in:
parent
c6b0043336
commit
0f4dcaa4e8
|
|
@ -0,0 +1,3 @@
|
|||
package a
|
||||
|
||||
class A
|
||||
|
|
@ -0,0 +1 @@
|
|||
import a.A
|
||||
|
|
@ -0,0 +1 @@
|
|||
package a
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
> compile
|
||||
|
||||
# remove class a.A
|
||||
$ copy-file changes/A.scala A.scala
|
||||
|
||||
# 'import a.A' should now fail in B.scala
|
||||
# succeeds because scalac doesn't track this dependency
|
||||
-> compile
|
||||
Loading…
Reference in New Issue