From e317b67a48b3b2368592aff8c3436133567daac1 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 4 Dec 2020 17:56:33 +0300 Subject: [PATCH] Api dump and import fixes --- dataforge-context/api/dataforge-context.api | 20 +++++++++---------- .../hep/dataforge/scripting/Builders.kt | 1 + .../api/dataforge-workspace.api | 2 -- .../hep/dataforge/workspace/GenericTask.kt | 3 ++- .../hep/dataforge/workspace/TaskBuilder.kt | 1 + .../workspace/SimpleWorkspaceTest.kt | 1 + 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/dataforge-context/api/dataforge-context.api b/dataforge-context/api/dataforge-context.api index 39fa72d8..f433949c 100644 --- a/dataforge-context/api/dataforge-context.api +++ b/dataforge-context/api/dataforge-context.api @@ -10,7 +10,6 @@ public abstract class hep/dataforge/context/AbstractPlugin : hep/dataforge/conte public fun getContext ()Lhep/dataforge/context/Context; public fun getDefaultChainTarget ()Ljava/lang/String; public fun getDefaultTarget ()Ljava/lang/String; - public fun getLogger ()Lmu/KLogger; public fun getMeta ()Lhep/dataforge/meta/Meta; public fun getName ()Lhep/dataforge/names/Name; protected final fun require (Lhep/dataforge/context/PluginFactory;)Lkotlin/properties/ReadOnlyProperty; @@ -47,7 +46,6 @@ public class hep/dataforge/context/Context : hep/dataforge/context/Named, hep/da public fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext; public fun getDefaultChainTarget ()Ljava/lang/String; public fun getDefaultTarget ()Ljava/lang/String; - public final fun getLogger ()Lmu/KLogger; public final fun getName ()Lhep/dataforge/names/Name; public final fun getParent ()Lhep/dataforge/context/Context; public final fun getPlugins ()Lhep/dataforge/context/PluginManager; @@ -59,11 +57,6 @@ public final class hep/dataforge/context/Context$Companion { public abstract interface class hep/dataforge/context/ContextAware { public abstract fun getContext ()Lhep/dataforge/context/Context; - public abstract fun getLogger ()Lmu/KLogger; -} - -public final class hep/dataforge/context/ContextAware$DefaultImpls { - public static fun getLogger (Lhep/dataforge/context/ContextAware;)Lmu/KLogger; } public final class hep/dataforge/context/ContextBuilder { @@ -100,6 +93,11 @@ public final class hep/dataforge/context/Global : hep/dataforge/context/Context public fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext; } +public final class hep/dataforge/context/LoggingKt { + public static final fun getLogger (Lhep/dataforge/context/Context;)Lmu/KLogger; + public static final fun getLogger (Lhep/dataforge/context/ContextAware;)Lmu/KLogger; +} + public abstract interface class hep/dataforge/context/Named { public static final field Companion Lhep/dataforge/context/Named$Companion; public abstract fun getName ()Lhep/dataforge/names/Name; @@ -133,7 +131,6 @@ public final class hep/dataforge/context/Plugin$DefaultImpls { public static fun content (Lhep/dataforge/context/Plugin;Ljava/lang/String;)Ljava/util/Map; public static fun getDefaultChainTarget (Lhep/dataforge/context/Plugin;)Ljava/lang/String; public static fun getDefaultTarget (Lhep/dataforge/context/Plugin;)Ljava/lang/String; - public static fun getLogger (Lhep/dataforge/context/Plugin;)Lmu/KLogger; public static fun getName (Lhep/dataforge/context/Plugin;)Lhep/dataforge/names/Name; public static fun toMeta (Lhep/dataforge/context/Plugin;)Lhep/dataforge/meta/Meta; } @@ -162,7 +159,6 @@ public final class hep/dataforge/context/PluginManager : hep/dataforge/context/C public static synthetic fun get$default (Lhep/dataforge/context/PluginManager;Lhep/dataforge/context/PluginTag;ZILjava/lang/Object;)Lhep/dataforge/context/Plugin; public static synthetic fun get$default (Lhep/dataforge/context/PluginManager;Lkotlin/reflect/KClass;Lhep/dataforge/context/PluginTag;ZILjava/lang/Object;)Ljava/lang/Object; public fun getContext ()Lhep/dataforge/context/Context; - public fun getLogger ()Lmu/KLogger; public fun iterator ()Ljava/util/Iterator; public final fun list (Z)Ljava/util/Collection; public final fun load (Lhep/dataforge/context/Plugin;)Lhep/dataforge/context/Plugin; @@ -286,8 +282,12 @@ public final class hep/dataforge/provider/Path$Companion { } public final class hep/dataforge/provider/PathKt { + public static final fun Path ([Lhep/dataforge/names/Name;)Ljava/util/List; + public static final fun Path ([Lkotlin/Pair;)Ljava/util/List; + public static final fun asPath (Lhep/dataforge/names/Name;Ljava/lang/String;)Ljava/util/List; + public static final fun asPath (Lhep/dataforge/provider/PathToken;)Ljava/util/List; + public static synthetic fun asPath$default (Lhep/dataforge/names/Name;Ljava/lang/String;ILjava/lang/Object;)Ljava/util/List; public static final fun plus-MQiGgVU (Ljava/util/List;Ljava/util/List;)Ljava/util/List; - public static final fun toPath (Lhep/dataforge/provider/PathToken;)Ljava/util/List; } public final class hep/dataforge/provider/PathToken { diff --git a/dataforge-scripting/src/jvmMain/kotlin/hep/dataforge/scripting/Builders.kt b/dataforge-scripting/src/jvmMain/kotlin/hep/dataforge/scripting/Builders.kt index e8b1d378..1e325595 100644 --- a/dataforge-scripting/src/jvmMain/kotlin/hep/dataforge/scripting/Builders.kt +++ b/dataforge-scripting/src/jvmMain/kotlin/hep/dataforge/scripting/Builders.kt @@ -2,6 +2,7 @@ package hep.dataforge.scripting import hep.dataforge.context.Context import hep.dataforge.context.Global +import hep.dataforge.context.logger import hep.dataforge.workspace.SimpleWorkspaceBuilder import hep.dataforge.workspace.Workspace import hep.dataforge.workspace.WorkspaceBuilder diff --git a/dataforge-workspace/api/dataforge-workspace.api b/dataforge-workspace/api/dataforge-workspace.api index c410f094..c599d391 100644 --- a/dataforge-workspace/api/dataforge-workspace.api +++ b/dataforge-workspace/api/dataforge-workspace.api @@ -65,7 +65,6 @@ public final class hep/dataforge/workspace/SimpleWorkspace : hep/dataforge/works public fun getData ()Lhep/dataforge/data/DataNode; public fun getDefaultChainTarget ()Ljava/lang/String; public fun getDefaultTarget ()Ljava/lang/String; - public fun getLogger ()Lmu/KLogger; public fun getTargets ()Ljava/util/Map; public fun getTasks ()Ljava/util/Map; public fun run (Lhep/dataforge/workspace/Task;Lhep/dataforge/meta/Meta;)Lhep/dataforge/data/DataNode; @@ -219,7 +218,6 @@ public final class hep/dataforge/workspace/Workspace$DefaultImpls { public static fun content (Lhep/dataforge/workspace/Workspace;Ljava/lang/String;)Ljava/util/Map; public static fun getDefaultChainTarget (Lhep/dataforge/workspace/Workspace;)Ljava/lang/String; public static fun getDefaultTarget (Lhep/dataforge/workspace/Workspace;)Ljava/lang/String; - public static fun getLogger (Lhep/dataforge/workspace/Workspace;)Lmu/KLogger; public static fun run (Lhep/dataforge/workspace/Workspace;Lhep/dataforge/workspace/Task;Lhep/dataforge/meta/Meta;)Lhep/dataforge/data/DataNode; } diff --git a/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/GenericTask.kt b/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/GenericTask.kt index d3844096..dc540a21 100644 --- a/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/GenericTask.kt +++ b/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/GenericTask.kt @@ -1,5 +1,6 @@ package hep.dataforge.workspace +import hep.dataforge.context.logger import hep.dataforge.data.DataNode import hep.dataforge.meta.Meta import hep.dataforge.meta.descriptors.NodeDescriptor @@ -27,7 +28,7 @@ public class GenericTask( val input = model.buildInput(workspace)// gather(workspace, model) //execute - workspace.context.logger.info{"Starting task '$name' on ${model.target} with meta: \n${model.meta}"} + workspace.logger.info{"Starting task '$name' on ${model.target} with meta: \n${model.meta}"} val output = dataTransform(workspace).invoke(model, input) //handle result diff --git a/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/TaskBuilder.kt b/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/TaskBuilder.kt index 4cb48843..f25faa97 100644 --- a/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/TaskBuilder.kt +++ b/dataforge-workspace/src/commonMain/kotlin/hep/dataforge/workspace/TaskBuilder.kt @@ -1,6 +1,7 @@ package hep.dataforge.workspace import hep.dataforge.context.Context +import hep.dataforge.context.logger import hep.dataforge.data.* import hep.dataforge.meta.DFBuilder import hep.dataforge.meta.Meta diff --git a/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt b/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt index a4df6a4b..e97f4be8 100644 --- a/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt +++ b/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt @@ -1,6 +1,7 @@ package hep.dataforge.workspace import hep.dataforge.context.PluginTag +import hep.dataforge.context.logger import hep.dataforge.data.* import hep.dataforge.meta.boolean import hep.dataforge.meta.builder