Skip to content

Commit

Permalink
Updates for Arrow Meta
Browse files Browse the repository at this point in the history
 * Use the new artifact name (arrow-kt/arrow-meta#810)
 * Update to the TypedQuotes classDeclaration (arrow-kt/arrow-meta#808)
  • Loading branch information
stabbylambda committed May 10, 2021
1 parent 1f01b98 commit e80096a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions compiler-plugin/api/compiler-plugin.api
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class com/intuit/hooks/plugin/HooksMetaPlugin : arrow/meta/Meta {
public fun irDelegatingConstructorCall (Larrow/meta/Meta;Lkotlin/jvm/functions/Function2;)Larrow/meta/phases/codegen/ir/IRGeneration;
public fun irDoWhileLoop (Larrow/meta/Meta;Lkotlin/jvm/functions/Function2;)Larrow/meta/phases/codegen/ir/IRGeneration;
public fun irDump (Larrow/meta/Meta;)Larrow/meta/phases/codegen/ir/IRGeneration;
public fun irDumpKotlinLike (Larrow/meta/Meta;Lorg/jetbrains/kotlin/ir/util/KotlinLikeDumpOptions;)Larrow/meta/phases/codegen/ir/IRGeneration;
public fun irDynamicExpression (Larrow/meta/Meta;Lkotlin/jvm/functions/Function2;)Larrow/meta/phases/codegen/ir/IRGeneration;
public fun irDynamicMemberExpression (Larrow/meta/Meta;Lkotlin/jvm/functions/Function2;)Larrow/meta/phases/codegen/ir/IRGeneration;
public fun irDynamicOperatorExpression (Larrow/meta/Meta;Lkotlin/jvm/functions/Function2;)Larrow/meta/phases/codegen/ir/IRGeneration;
Expand Down
4 changes: 2 additions & 2 deletions compiler-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
pluginDependency("io.arrow-kt", "arrow-annotations", ARROW_VERSION)
pluginDependency("io.arrow-kt", "arrow-syntax", ARROW_VERSION)
pluginDependency("io.arrow-kt", "arrow-core-data", ARROW_VERSION)
pluginDependency("io.arrow-kt", "compiler-plugin-core", ARROW_META_VERSION)
pluginDependency("io.arrow-kt", "arrow-meta", ARROW_META_VERSION)

compileOnly(kotlin("stdlib"))
compileOnly(kotlin("compiler-embeddable"))
Expand All @@ -28,7 +28,7 @@ dependencies {
testImplementation(project(":hooks"))
testImplementation("io.arrow-kt:arrow-meta-prelude:$ARROW_META_VERSION")
testImplementation("io.arrow-kt:arrow-core:$ARROW_VERSION")
testImplementation("io.arrow-kt:compiler-plugin:$ARROW_META_VERSION")
testImplementation("io.arrow-kt:arrow-meta:$ARROW_META_VERSION")
testImplementation("io.arrow-kt:meta-test:$ARROW_META_VERSION")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ internal val Meta.hooks: CliPlugin
get() =
"Hooks" {
meta(
classDeclaration(this, KtClass::isHooksDslClass) { c ->
classDeclaration(this, { this.element.isHooksDslClass }) { c ->
findHooks().map<Transform<KtClass>> { codeGen ->
val `package` = c.containingKtFile.packageDirective?.text ?: ""
val `package` = c.element.containingKtFile.packageDirective?.text ?: ""
val (classes, properties) = codeGen.map(::generateHookClass).unzip()
val imports = createImportDirectives(c, codeGen)
val imports = createImportDirectives(c.element, codeGen)

val newSource =
"""|${`package`}
Expand Down

0 comments on commit e80096a

Please sign in to comment.