Scripting: improve reporting on cyclic dependency
#KT-48177 fixed the issue is in fact fixed by the previous commit (report error on duplicated import) by normalizing import path before processing, but here we're making error reporting nicer for the case.
This commit is contained in:
committed by
TeamCityServer
parent
c204d7a86f
commit
e60e80f19a
+6
@@ -127,6 +127,12 @@ class MainKtsTest {
|
||||
assertFailed("Duplicate imports:", res)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCyclicImportError() {
|
||||
val res = evalFile(File("$TEST_DATA_ROOT/import-cycle-1.main.kts"))
|
||||
assertFailed("Unable to handle recursive script dependencies", res)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCompilerOptions() {
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
@file:Import("import-cycle-2.main.kts")
|
||||
|
||||
1
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
@file:Import("import-cycle-1.main.kts")
|
||||
|
||||
2
|
||||
Reference in New Issue
Block a user