allow to include same file from multiple files #133
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add a set of already added files and check if files was already added, in such case do not try to add it again
This happened to me while trying to include same files from multiple files (diamond topology)
got this exception when starting an idea project:
Exception in thread "main" kotlin.io.FileAlreadyExistsException: .../kscripts/utils.kt -> /Users/oshai/.kscript/kscript_tmp_project__ksuite.kts_1530089926297/src/utils.kt: The destination file already exists.
at kotlin.io.FilesKt__UtilsKt.copyTo(Utils.kt:193)
at kotlin.io.FilesKt__UtilsKt.copyTo$default(Utils.kt:184)
at kscript.app.AppHelpersKt.createSymLink(AppHelpers.kt:267)
at kscript.app.AppHelpersKt.launchIdeaWithKscriptlet(AppHelpers.kt:254)
at kscript.app.KscriptKt.main(Kscript.kt:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jetbrains.kotlin.runner.AbstractRunner.run(runners.kt:61)
at org.jetbrains.kotlin.runner.Main.run(Main.kt:109)
at org.jetbrains.kotlin.runner.Main.main(Main.kt:119)