Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen committed Dec 5, 2024
1 parent 5b992f3 commit 2d71718
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ import java.io.FileNotFoundException
import java.nio.file.Path
import kotlin.io.path.Path
import kotlin.io.path.absolute
import kotlin.io.path.createTempDirectory
import kotlin.io.path.div
import kotlin.io.path.exists
import kotlin.io.path.inputStream
import kotlin.io.path.nameWithoutExtension
import kotlin.io.path.pathString
import kotlin.io.path.relativeTo
import kotlin.time.Duration.Companion.seconds

private const val ENV_VAR_ARK_ANALYZER_DIR = "ARKANALYZER_DIR"
Expand Down Expand Up @@ -81,27 +78,3 @@ fun loadEtsFileAutoConvert(tsPath: Path): EtsFile {
return etsFile
}
}

fun loadEtsProjectAutoConvert(
path: Path,
loadEntrypoints: Boolean = false,
useArkAnalyzerTypeInference: Int? = 1,
): EtsScene {
val irFolderPath = generateEtsIR(
path,
isProject = true,
loadEntrypoints = loadEntrypoints,
useArkAnalyzerTypeInference = useArkAnalyzerTypeInference,
)
val files = irFolderPath
.walk()
.filter { it.extension == "json" }
.map {
it.inputStream().use { stream ->
val etsFileDto = EtsFileDto.loadFromJson(stream)
convertToEtsFile(etsFileDto)
}
}
.toList()
return EtsScene(files)
}

0 comments on commit 2d71718

Please sign in to comment.