Skip to content

Commit

Permalink
Check ABI compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
anti-social committed Nov 15, 2021
1 parent 0ad467e commit 93c4295
Show file tree
Hide file tree
Showing 11 changed files with 4,870 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ jobs:
set -eux
./gradlew detekt $GRADLE_ARGS
- name: Check ABI compatibility
run: |
set -eux
./gradlew apiCheck $GRADLE_ARGS
- name: Run unit tests
run: |
set -eux
Expand Down
3,736 changes: 3,736 additions & 0 deletions api/elasticmagic.api

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
`maven-publish`
signing
kotlin("multiplatform") apply false
id(Plugins.binaryCompatibilityValidator) version Versions.binaryCompatibilityValidator
id("io.gitlab.arturbosch.detekt") version Versions.detekt apply false
id("org.jetbrains.dokka") version Versions.dokka
id("ru.vyarus.mkdocs") version Versions.mkdocs
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import org.gradle.api.JavaVersion
import org.gradle.kotlin.dsl.PluginDependenciesSpecScope
import org.gradle.plugin.use.PluginDependencySpec

import java.util.Properties

Expand All @@ -12,6 +14,7 @@ object Versions {
const val detekt = "1.18.1"
const val dokka = "1.5.0"
const val mkdocs = "2.1.1"
const val binaryCompatibilityValidator = "0.8.0"

// Kotlin and libs
val kotlin = versionProps["kotlin"]!!.toString()
Expand All @@ -35,6 +38,10 @@ object Versions {
}
}

object Plugins {
val binaryCompatibilityValidator = "org.jetbrains.kotlinx.binary-compatibility-validator"
}

object Libs {
fun kotest(flavor: String): String {
return "io.kotest:kotest-$flavor:${Versions.kotest}"
Expand Down
42 changes: 42 additions & 0 deletions kotlinx-datetime/api/elasticmagic-kotlinx-datetime.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
public abstract class dev/evo/elasticmagic/doc/BaseKotlinxDateTimeType : dev/evo/elasticmagic/types/BaseDateTimeType {
public fun <init> ()V
protected final fun parse (Ljava/lang/Object;)Lkotlinx/datetime/Instant;
public fun serializeTerm (Ljava/lang/Object;)Ljava/lang/Object;
}

public final class dev/evo/elasticmagic/doc/DateFieldKt {
public static final fun date (Ldev/evo/elasticmagic/doc/FieldSet;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/Map;)Ldev/evo/elasticmagic/doc/FieldSet$Field;
public static synthetic fun date$default (Ldev/evo/elasticmagic/doc/FieldSet;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/Map;ILjava/lang/Object;)Ldev/evo/elasticmagic/doc/FieldSet$Field;
public static final fun datetime (Ldev/evo/elasticmagic/doc/FieldSet;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/Map;)Ldev/evo/elasticmagic/doc/FieldSet$Field;
public static synthetic fun datetime$default (Ldev/evo/elasticmagic/doc/FieldSet;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/Map;ILjava/lang/Object;)Ldev/evo/elasticmagic/doc/FieldSet$Field;
public static final fun instant (Ldev/evo/elasticmagic/doc/FieldSet;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/Map;)Ldev/evo/elasticmagic/doc/FieldSet$Field;
public static synthetic fun instant$default (Ldev/evo/elasticmagic/doc/FieldSet;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/Map;ILjava/lang/Object;)Ldev/evo/elasticmagic/doc/FieldSet$Field;
}

public final class dev/evo/elasticmagic/doc/DateTimeType : dev/evo/elasticmagic/doc/BaseKotlinxDateTimeType {
public static final field INSTANCE Ldev/evo/elasticmagic/doc/DateTimeType;
public synthetic fun deserialize (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
public fun deserialize (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Lkotlinx/datetime/LocalDateTime;
public fun getTermType ()Lkotlin/reflect/KClass;
public synthetic fun serialize (Ljava/lang/Object;)Ljava/lang/Object;
public fun serialize (Lkotlinx/datetime/LocalDateTime;)Ljava/lang/Object;
}

public final class dev/evo/elasticmagic/doc/DateType : dev/evo/elasticmagic/doc/BaseKotlinxDateTimeType {
public static final field INSTANCE Ldev/evo/elasticmagic/doc/DateType;
public synthetic fun deserialize (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
public fun deserialize (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Lkotlinx/datetime/LocalDate;
public fun getTermType ()Lkotlin/reflect/KClass;
public synthetic fun serialize (Ljava/lang/Object;)Ljava/lang/Object;
public fun serialize (Lkotlinx/datetime/LocalDate;)Ljava/lang/String;
}

public final class dev/evo/elasticmagic/doc/InstantType : dev/evo/elasticmagic/doc/BaseKotlinxDateTimeType {
public static final field INSTANCE Ldev/evo/elasticmagic/doc/InstantType;
public synthetic fun deserialize (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
public fun deserialize (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Lkotlinx/datetime/Instant;
public fun getTermType ()Lkotlin/reflect/KClass;
public synthetic fun serialize (Ljava/lang/Object;)Ljava/lang/Object;
public fun serialize (Lkotlinx/datetime/Instant;)Ljava/lang/String;
}

292 changes: 292 additions & 0 deletions samples/api/samples.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
public final class samples/code/SearchQuery/SearchQueryKt {
public static final fun aggs ()V
public static final fun filter ()V
public static final fun getSearchQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun postFilter ()V
public static final fun query ()V
public static final fun queryNode ()V
public static final fun rescore ()V
public static final fun sort ()V
}

public final class samples/code/SearchQuery/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/code/SearchQuery/UserDoc;
public final fun getAbout ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getName ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getRank ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun isActive ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/docsource/RoleDoc : dev/evo/elasticmagic/doc/SubDocument {
public fun <init> (Ldev/evo/elasticmagic/doc/BoundField;)V
public final fun getName ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getPermissions ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/docsource/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/docsource/UserDoc;
public final fun getGroups ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getLogin ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getRoles ()Lsamples/docsource/RoleDoc;
}

public final class samples/docsource/custom/RoleDocSource : dev/evo/elasticmagic/doc/DocSource {
public fun <init> ()V
public final fun getName ()Ljava/lang/String;
public final fun getPermissions ()Ljava/util/List;
public final fun setName (Ljava/lang/String;)V
public final fun setPermissions (Ljava/util/List;)V
}

public final class samples/docsource/custom/UserDocSource : dev/evo/elasticmagic/doc/DocSource {
public fun <init> ()V
public final fun getGroups ()Ljava/util/List;
public final fun getId ()I
public final fun getLogin ()Ljava/lang/String;
public final fun getRoles ()Ljava/util/List;
public final fun setGroups (Ljava/util/List;)V
public final fun setId (I)V
public final fun setLogin (Ljava/lang/String;)V
public final fun setRoles (Ljava/util/List;)V
}

public final class samples/docsource/custom/UserDocSourceKt {
public static final fun getNobody ()Lsamples/docsource/custom/UserDocSource;
public static final fun getNobodyHasGroups ()Z
public static final fun getRoot ()Lsamples/docsource/custom/UserDocSource;
public static final fun getRootId ()I
public static final fun getRootPermissions ()Ljava/util/List;
}

public final class samples/docsource/dynamic/DynDocSourceKt {
public static final fun getRoot ()Ldev/evo/elasticmagic/doc/DynDocSource;
public static final fun getRootId ()Ljava/lang/Integer;
public static final fun getRootPermissions ()Ljava/util/List;
}

public final class samples/document/enums/SearchQueryKt {
public static final fun getQ ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/document/enums/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/enums/UserDoc;
public final fun getStatus ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/enums/UserStatus : java/lang/Enum {
public static final field ACTIVE Lsamples/document/enums/UserStatus;
public static final field LOCKED Lsamples/document/enums/UserStatus;
public static final field NO_PASSWORD Lsamples/document/enums/UserStatus;
public static fun valueOf (Ljava/lang/String;)Lsamples/document/enums/UserStatus;
public static fun values ()[Lsamples/document/enums/UserStatus;
}

public final class samples/document/field/SearchQueryKt {
public static final fun getFakeAdmins ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/document/field/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/field/UserDoc;
public final fun getAbout ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getLogin ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun isAdmin ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/join/AnswerDoc : samples/document/join/BaseQADoc {
public static final field INSTANCE Lsamples/document/join/AnswerDoc;
public final fun getAccepted ()Ldev/evo/elasticmagic/doc/BoundField;
}

public abstract class samples/document/join/BaseQADoc : dev/evo/elasticmagic/doc/Document {
public fun <init> ()V
public final fun getContent ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getJoin ()Ldev/evo/elasticmagic/doc/BoundJoinField;
}

public final class samples/document/join/MergeKt {
public static final fun getQAMapping ()Ldev/evo/elasticmagic/doc/Document;
}

public final class samples/document/join/QuestionDoc : samples/document/join/BaseQADoc {
public static final field INSTANCE Lsamples/document/join/QuestionDoc;
public final fun getRating ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getTitle ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/meta/ProductDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/meta/ProductDoc;
public final fun getCompanyId ()Ldev/evo/elasticmagic/doc/BoundField;
public fun getMeta ()Ldev/evo/elasticmagic/doc/MetaFields;
public final fun getName ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/nested/NestedKt {
public static final fun getModerators ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/document/nested/RoleDoc : dev/evo/elasticmagic/doc/SubDocument {
public fun <init> (Ldev/evo/elasticmagic/doc/BoundField;)V
public final fun getName ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getPermissions ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/nested/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/nested/UserDoc;
public final fun getRoles ()Lsamples/document/nested/RoleDoc;
}

public final class samples/document/object/GroupDoc : dev/evo/elasticmagic/doc/SubDocument {
public fun <init> (Ldev/evo/elasticmagic/doc/BoundField;)V
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getName ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/object/ObjectKt {
public static final fun getSystemUsers ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/document/object/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/object/UserDoc;
public final fun getGroups ()Lsamples/document/object/GroupDoc;
}

public final class samples/document/shortcuts/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/shortcuts/UserDoc;
public final fun getAbout ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getLogin ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun isAdmin ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/subfields/AboutSubFields : dev/evo/elasticmagic/doc/SubFields {
public fun <init> (Ldev/evo/elasticmagic/doc/BoundField;)V
public final fun getAutocomplete ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getSort ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/subfields/SearchQueryKt {
public static final fun getMaybeNiceUsers ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/document/subfields/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/subfields/UserDoc;
public final fun getAbout ()Lsamples/document/subfields/AboutSubFields;
}

public final class samples/document/subfields/mistake/AboutSubFields : dev/evo/elasticmagic/doc/SubFields {
public fun <init> (Ldev/evo/elasticmagic/doc/BoundField;)V
public final fun getSort ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/document/subfields/mistake/MistakeKt {
public static final fun main ()V
public static synthetic fun main ([Ljava/lang/String;)V
}

public final class samples/document/subfields/mistake/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/document/subfields/mistake/UserDoc;
public final fun getAbout ()Lsamples/document/subfields/mistake/AboutSubFields;
public final fun getDescription ()Lsamples/document/subfields/mistake/AboutSubFields;
}

public final class samples/querying/AggsKt {
public static final fun getRatingHistogramQuery ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/querying/CloneKt {
public static final fun getClonedQuery ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/querying/ConstructorKt {
public static final fun getQ ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun setQ (Ldev/evo/elasticmagic/SearchQuery;)V
}

public final class samples/querying/FilterKt {
public static final fun getActiveUsersQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getActiveUsersQuery2 ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getActiveUsersQuery3 ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/querying/NodesKt {
public static final fun getAdditionalLangFields ()Ljava/util/List;
public static final fun getAdditionalLanguages ()Ljava/util/List;
public static final fun getBoostByNumberOfVotes ()Z
public static final fun getBoostedQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getLangHandle ()Ldev/evo/elasticmagic/query/NodeHandle;
public static final fun getLangQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getScoringHandle ()Ldev/evo/elasticmagic/query/NodeHandle;
public static final fun getSearchTerm ()Ljava/lang/String;
public static final fun getSkeletonQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getUserLang ()Ljava/lang/String;
public static final fun setBoostedQuery (Ldev/evo/elasticmagic/SearchQuery;)V
}

public final class samples/querying/QueryMethodKt {
public static final fun getQ2 ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/querying/QuestionDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/querying/QuestionDoc;
public final fun getRating ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getText ()Lsamples/querying/TranslationDoc;
public final fun getTitle ()Lsamples/querying/TranslationDoc;
public final fun getVotes ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/querying/SortKt {
public static final fun getMultipleSortedQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getSortedByIdDescQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getSortedByIdQuery ()Ldev/evo/elasticmagic/SearchQuery;
public static final fun getSortedByRatingQuery ()Ldev/evo/elasticmagic/SearchQuery;
}

public final class samples/querying/TranslationDoc : dev/evo/elasticmagic/doc/SubDocument {
public fun <init> (Ldev/evo/elasticmagic/doc/BoundField;)V
public final fun getDe ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getEn ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getRu ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/querying/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/querying/UserDoc;
public final fun getAbout ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getGroups ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getRating ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun isActive ()Ldev/evo/elasticmagic/doc/BoundField;
}

public final class samples/started/ClusterKt {
public static final fun getCluster ()Ldev/evo/elasticmagic/ElasticsearchCluster;
public static final fun getEsTransport ()Ldev/evo/elasticmagic/transport/ElasticsearchKtorTransport;
public static final fun getUserIndex ()Ldev/evo/elasticmagic/ElasticsearchIndex;
}

public final class samples/started/EnsureIndexExistsKt {
public static final fun ensureIndexExists (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class samples/started/IndexDocsKt {
public static final fun indexDocs (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class samples/started/MainKt {
public static final fun main (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun main ([Ljava/lang/String;)V
public static final fun printGroupsAgg (Ldev/evo/elasticmagic/aggs/TermsAggResult;)V
public static final fun printUsers (Ldev/evo/elasticmagic/SearchQueryResult;)V
}

public final class samples/started/UserDoc : dev/evo/elasticmagic/doc/Document {
public static final field INSTANCE Lsamples/started/UserDoc;
public final fun getAbout ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getGroups ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getId ()Ldev/evo/elasticmagic/doc/BoundField;
public final fun getName ()Ldev/evo/elasticmagic/doc/BoundField;
}

Loading

0 comments on commit 93c4295

Please sign in to comment.