From 5c17c6597e478798894117816034d90cdaf2935e Mon Sep 17 00:00:00 2001 From: Kacper Korban Date: Wed, 3 Feb 2021 17:58:32 +0100 Subject: [PATCH] Rename inkuire file formats --- Procfile | 2 +- README.md | 2 +- .../plugin/translators/InkuireDocumentableToPageTranslator.kt | 4 ++-- .../scala/org/virtuslab/inkuire/engine/http/cli/Cli.scala | 4 ++-- .../inkuire/serialization/SerializationIntegrationTest.kt | 2 +- ...ib-common.inkuire.adb => kotlin-stdlib-common.adb.inkuire} | 0 ...stdlib-java.inkuire.adb => kotlin-stdlib-java.adb.inkuire} | 0 ...stdlib-jdk7.inkuire.adb => kotlin-stdlib-jdk7.adb.inkuire} | 0 ...stdlib-jdk8.inkuire.adb => kotlin-stdlib-jdk8.adb.inkuire} | 0 ...lin-stdlib-js.inkuire.adb => kotlin-stdlib-js.adb.inkuire} | 0 ...ib-native.inkuire.adb => kotlin-stdlib-native.adb.inkuire} | 0 11 files changed, 7 insertions(+), 7 deletions(-) rename stdlib-adbs/{kotlin-stdlib-common.inkuire.adb => kotlin-stdlib-common.adb.inkuire} (100%) rename stdlib-adbs/{kotlin-stdlib-java.inkuire.adb => kotlin-stdlib-java.adb.inkuire} (100%) rename stdlib-adbs/{kotlin-stdlib-jdk7.inkuire.adb => kotlin-stdlib-jdk7.adb.inkuire} (100%) rename stdlib-adbs/{kotlin-stdlib-jdk8.inkuire.adb => kotlin-stdlib-jdk8.adb.inkuire} (100%) rename stdlib-adbs/{kotlin-stdlib-js.inkuire.adb => kotlin-stdlib-js.adb.inkuire} (100%) rename stdlib-adbs/{kotlin-stdlib-native.inkuire.adb => kotlin-stdlib-native.adb.inkuire} (100%) diff --git a/Procfile b/Procfile index dfd3e4b1..5a00ef41 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: java -jar engineHttp/target/scala-2.13/engineHttp-assembly-0.1.0-SNAPSHOT.jar --address 0.0.0.0 -p $PORT -d $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.inkuire.fdb -d $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.inkuire.fdb -d $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.inkuire.fdb -a $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.inkuire.adb -a $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.inkuire.adb -a $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.inkuire.adb \ No newline at end of file +web: java -jar engineHttp/target/scala-2.13/engineHttp-assembly-0.1.0-SNAPSHOT.jar --address 0.0.0.0 -p $PORT -d $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.fdb.inkuire -d $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.fdb.inkuire -d $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.fdb.inkuire -a $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.adb.inkuire -a $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.adb.inkuire -a $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.adb.inkuire \ No newline at end of file diff --git a/README.md b/README.md index fde2d73d..8bd58d59 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ We hope that in future release Inkuire will support multiplatform and autoconfig * Function database paths - `{ --database | -d }` - Arguments that define URLs to function database JSONs Don't forget that URLs need to have protocol prefix, so if you want to provide path to a local file, it needs to be in `file://(path)` format. -Also if the paths point to directories, all files with extensions `.inkuire.adb` and `.inkuire.fdb` respectively for ancestry graph and database will be loaded. +Also if the paths point to directories, all files with extensions `.adb.inkuire` and `.fdb.inkuire` respectively for ancestry graph and database will be loaded. ##### API Endpoints diff --git a/dokka-common/src/main/kotlin/org/virtuslab/inkuire/plugin/translators/InkuireDocumentableToPageTranslator.kt b/dokka-common/src/main/kotlin/org/virtuslab/inkuire/plugin/translators/InkuireDocumentableToPageTranslator.kt index a56e50e9..c42102d3 100644 --- a/dokka-common/src/main/kotlin/org/virtuslab/inkuire/plugin/translators/InkuireDocumentableToPageTranslator.kt +++ b/dokka-common/src/main/kotlin/org/virtuslab/inkuire/plugin/translators/InkuireDocumentableToPageTranslator.kt @@ -170,7 +170,7 @@ class InkuireDocumentableToPageTranslator(val renderingStrategy: (callback: (Dri private fun List.toAncestryGraphJson(): String = CustomGson.instance.toJson(this) private fun pathOfFdb(module: DModule, sourceSet: DokkaConfiguration.DokkaSourceSet): String = - "inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.inkuire.fdb" + "inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.fdb.inkuire" private fun pathOfAdb(module: DModule, sourceSet: DokkaConfiguration.DokkaSourceSet): String = - "inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.inkuire.adb" + "inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.adb.inkuire" } diff --git a/engineHttp/src/main/scala/org/virtuslab/inkuire/engine/http/cli/Cli.scala b/engineHttp/src/main/scala/org/virtuslab/inkuire/engine/http/cli/Cli.scala index b5ea32fa..68c0472e 100644 --- a/engineHttp/src/main/scala/org/virtuslab/inkuire/engine/http/cli/Cli.scala +++ b/engineHttp/src/main/scala/org/virtuslab/inkuire/engine/http/cli/Cli.scala @@ -95,9 +95,9 @@ class Cli extends InputHandler with OutputHandler with ConfigReader with IOHelpe override def readInput(appConfig: AppConfig): EitherT[IO, String, InkuireDb] = { InkuireDb .read( - appConfig.dbPaths.toList.flatMap(path => getURLs(new URL(path.path), ".inkuire.fdb")).map(getURLContent), + appConfig.dbPaths.toList.flatMap(path => getURLs(new URL(path.path), ".fdb.inkuire")).map(getURLContent), appConfig.ancestryGraphPaths.toList - .flatMap(path => getURLs(new URL(path.path), ".inkuire.adb")) + .flatMap(path => getURLs(new URL(path.path), ".adb.inkuire")) .map(getURLContent) ) .traverse(value => IO { value }) diff --git a/integration-tests/src/test/kotlin/org/virtuslab/inkuire/serialization/SerializationIntegrationTest.kt b/integration-tests/src/test/kotlin/org/virtuslab/inkuire/serialization/SerializationIntegrationTest.kt index 46615e72..8e1a7403 100644 --- a/integration-tests/src/test/kotlin/org/virtuslab/inkuire/serialization/SerializationIntegrationTest.kt +++ b/integration-tests/src/test/kotlin/org/virtuslab/inkuire/serialization/SerializationIntegrationTest.kt @@ -86,7 +86,7 @@ class SerializationIntegrationTest : AbstractCoreTest() { @Test fun `serialize and deserialize`() { parent.walkTopDown().filter { it.name in listOf("common", "js", "jvm") }.forEach { - assertEquals(listOf("example.inkuire.adb", "example.inkuire.fdb").sorted(), it.listFiles().map { it.name }.sorted()) + assertEquals(listOf("example.adb.inkuire", "example.fdb.inkuire").sorted(), it.listFiles().map { it.name }.sorted()) } assertTrue(inkuireDb.functions().size() > 0) assertTrue(inkuireDb.functions().findSignature("jsSpecificFun").isEmpty()) diff --git a/stdlib-adbs/kotlin-stdlib-common.inkuire.adb b/stdlib-adbs/kotlin-stdlib-common.adb.inkuire similarity index 100% rename from stdlib-adbs/kotlin-stdlib-common.inkuire.adb rename to stdlib-adbs/kotlin-stdlib-common.adb.inkuire diff --git a/stdlib-adbs/kotlin-stdlib-java.inkuire.adb b/stdlib-adbs/kotlin-stdlib-java.adb.inkuire similarity index 100% rename from stdlib-adbs/kotlin-stdlib-java.inkuire.adb rename to stdlib-adbs/kotlin-stdlib-java.adb.inkuire diff --git a/stdlib-adbs/kotlin-stdlib-jdk7.inkuire.adb b/stdlib-adbs/kotlin-stdlib-jdk7.adb.inkuire similarity index 100% rename from stdlib-adbs/kotlin-stdlib-jdk7.inkuire.adb rename to stdlib-adbs/kotlin-stdlib-jdk7.adb.inkuire diff --git a/stdlib-adbs/kotlin-stdlib-jdk8.inkuire.adb b/stdlib-adbs/kotlin-stdlib-jdk8.adb.inkuire similarity index 100% rename from stdlib-adbs/kotlin-stdlib-jdk8.inkuire.adb rename to stdlib-adbs/kotlin-stdlib-jdk8.adb.inkuire diff --git a/stdlib-adbs/kotlin-stdlib-js.inkuire.adb b/stdlib-adbs/kotlin-stdlib-js.adb.inkuire similarity index 100% rename from stdlib-adbs/kotlin-stdlib-js.inkuire.adb rename to stdlib-adbs/kotlin-stdlib-js.adb.inkuire diff --git a/stdlib-adbs/kotlin-stdlib-native.inkuire.adb b/stdlib-adbs/kotlin-stdlib-native.adb.inkuire similarity index 100% rename from stdlib-adbs/kotlin-stdlib-native.inkuire.adb rename to stdlib-adbs/kotlin-stdlib-native.adb.inkuire