From cfa6e0f8b1e167b1e4f105e19add5b045cea8f6e Mon Sep 17 00:00:00 2001 From: Dmitriy Bushin Date: Tue, 17 Nov 2026 02:07:00 +0700 Subject: [PATCH] Check the clients of a facade by KSP --- design/pattern/README.md | 38 ++-- .../facade/FacadeSymbolProcessor.kt | 22 +- .../structural/facade/MemberSignatureTypes.kt | 53 ++++- .../SubsystemAccessThroughFacadeChecker.kt | 90 ++++++++ .../SubsystemIndependentOfFacadeChecker.kt | 48 ++++ .../facade/FacadeSymbolProcessorTests.kt | 212 ++++++++++++++++++ 6 files changed, 440 insertions(+), 23 deletions(-) create mode 100644 design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemAccessThroughFacadeChecker.kt create mode 100644 design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemIndependentOfFacadeChecker.kt diff --git a/design/pattern/README.md b/design/pattern/README.md index 2c6afc6a..5175ee8f 100644 --- a/design/pattern/README.md +++ b/design/pattern/README.md @@ -464,7 +464,8 @@ marker of its own. The rules of the two annotations: only if it carries the marker of that subsystem or is a facade that names it; a top-level function or property names none. `FileController` keeps the rules, `AdminFileController` breaks the first: it reaches the storage past the facade, and a deletion of its own forgets the quota. -- A class of a subsystem takes no facade that names its own subsystem: the subsystem knows nothing of its facade. +- A class of a subsystem takes no facade that names its own subsystem, in a parameter or a property: the subsystem + knows nothing of its facade. A configuration of the subsystem still returns the facade from a `@Bean` method. - A function or property of a facade that a client sees, public or internal, anything but private in Java, its companion's too, its constructor aside, neither takes nor returns a type of its subsystems: the facade answers with a type of its own, `FileView`, and a client stays apart from the schema of the database. @@ -485,15 +486,14 @@ The way past the facade is a marker: a class that carries one joins its subsyste word. A review sees the marker, and a search by it finds each class annotated with it; a class that takes a marker from a supertype is named in the errors with the class the marker comes from: `@FileSubsystem through FileEntity`. -The annotations check nothing themselves: `semantic-pattern-ksp` checks the rules of a facade and of the markers -when a module is compiled, and the plan adds the rules of clients to it and the check of Spring when the application -starts. Kotlin has no visibility of a package, as Java has, and `internal` covers a whole Gradle module: in one -service every class of a subsystem is open to every client. The compiler closes a class to those that do not declare -`@OptIn` of its marker, if the marker is annotated with `@RequiresOptIn` of the level `ERROR`, as -`@InternalCoroutinesApi` closes the internals of kotlinx.coroutines. Kotlin takes no other annotation for `@OptIn`, -though: a facade would name its subsystem twice, in `@Facade` and in `@OptIn`. The marker here is a plain -annotation, and the checks read it from the classes; the compiler still checks the bodies of functions for a project -that adds `@RequiresOptIn` to its marker and `@OptIn` to its facade. +The annotations check nothing themselves: `semantic-pattern-ksp` checks the rules when a module is compiled, and the +plan adds the check of Spring for the first rule when the application starts. Kotlin has no visibility of a package, +as Java has, and `internal` covers a whole Gradle module: in one service every class of a subsystem is open to every +client. The compiler closes a class to those that do not declare `@OptIn` of its marker, if the marker is annotated +with `@RequiresOptIn` of the level `ERROR`, as `@InternalCoroutinesApi` closes the internals of kotlinx.coroutines. +Kotlin takes no other annotation for `@OptIn`, though: a facade would name its subsystem twice, in `@Facade` and in +`@OptIn`. The marker here is a plain annotation, and the checks read it from the classes; the compiler still checks +the bodies of functions for a project that adds `@RequiresOptIn` to its marker and `@OptIn` to its facade. `@Facade` and the marker are annotations, not interfaces, as the layers of `semantic-explicit` are: a facade has no operation that every facade shares, and the annotations ask nothing of a class. `@Facade.Subsystem` marks an @@ -545,20 +545,22 @@ dependencies { } ``` -A `find` of the facade above that returned `FileEntity` instead of `FileView` stops the build at its line, in a file -that starts with the facade: +`AdminFileController` above stops the build at its line, in a file of its own: ```text -e: [ksp] /…/FileFacade.kt:18: Facade FileFacade exposes FileEntity of @FileSubsystem +e: [ksp] /…/AdminFileController.kt:3: AdminFileController names FileStorageClient of @FileSubsystem past a facade ``` -- It checks the annotation of each facade and the members a client sees of it, and the markers of each class of the - module, nested ones too, and of its supertypes, in Kotlin and in Java, under a type alias as well. The rules of - clients come next, by the plan. +- It checks the declarations of the module, in Kotlin and in Java: the annotation of each facade and the members a + client sees of it, the markers of each class and of its supertypes, under a type alias as well, the constructors, + properties and signatures of functions of each class, nested ones too, and each top-level function and property. A + class of a subsystem named in the body of a function, an initializer or a default value goes unseen: KSP sees no + bodies. - A marker of a class of another module is read from its class file, as Kotlin keeps an annotation there by default, and so are the supertypes that pass their markers on. - A type alias counts as the type it stands for, a function type as its parameters and result, a parameter of a type as its bounds. +- A narrow interface of a facade carries no annotation, so a class of a subsystem that takes one goes unseen. - `FacadeSymbolProcessorProvider` is listed in `META-INF/services`, where KSP finds its processors by `ServiceLoader`. ### Plan of Facade @@ -568,8 +570,8 @@ e: [ksp] /…/FileFacade.kt:18: Facade FileFacade exposes FileEntity of @FileSub 3. The rule of members a client sees of a facade in `semantic-pattern-ksp`. 4. The markers of supertypes in `semantic-pattern-ksp`. 5. The rules of clients in `semantic-pattern-ksp`: the constructors, properties and signatures of functions of each - class and each top-level declaration. KSP sees no bodies of functions: a class of a subsystem made in a body goes - unseen. + class and each top-level declaration. KSP sees no bodies: a class of a subsystem named in the body of a function, + an initializer or a default value goes unseen. 6. A check of `semantic-pattern-spring` that stops the startup on an injection that breaks the first rule, as `ApplicationModules.verify()` of Spring Modulith checks the modules in a test. It reads the dependencies Spring records between beans, as `getDependentBeans` of `ConfigurableBeanFactory` tells them, and catches beans that diff --git a/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/FacadeSymbolProcessor.kt b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/FacadeSymbolProcessor.kt index 769b4024..3ffab7a3 100644 --- a/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/FacadeSymbolProcessor.kt +++ b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/FacadeSymbolProcessor.kt @@ -5,13 +5,20 @@ import com.google.devtools.ksp.processing.Resolver import com.google.devtools.ksp.processing.SymbolProcessor import com.google.devtools.ksp.symbol.KSAnnotated import com.google.devtools.ksp.symbol.KSClassDeclaration +import com.google.devtools.ksp.symbol.KSDeclaration import com.google.devtools.ksp.symbol.KSFile +import com.google.devtools.ksp.symbol.KSFunctionDeclaration +import com.google.devtools.ksp.symbol.KSPropertyDeclaration import pro.vlprojects.semantic.ksp.helper.getDeclaredClasses internal class FacadeSymbolProcessor(logger: KSPLogger) : SymbolProcessor { private val singleSubsystemMembershipChecker = SingleSubsystemMembershipChecker(logger) + private val subsystemAccessThroughFacadeChecker = SubsystemAccessThroughFacadeChecker(logger) + + private val subsystemIndependentOfFacadeChecker = SubsystemIndependentOfFacadeChecker(logger) + private val facadeOnClassChecker = FacadeOnClassChecker(logger) private val facadeSubsystemsNotEmptyChecker = FacadeSubsystemsNotEmptyChecker(logger) @@ -26,15 +33,24 @@ internal class FacadeSymbolProcessor(logger: KSPLogger) : SymbolProcessor { resolver .getNewFiles() .flatMap(KSFile::declarations) - .filterIsInstance() - .flatMap(::flattenClasses) - .forEach(::checkClass) + .forEach(::checkDeclaration) return emptyList() } + private fun checkDeclaration(declaration: KSDeclaration) { + when (declaration) { + is KSClassDeclaration -> this.flattenClasses(declaration).forEach(::checkClass) + is KSFunctionDeclaration -> this.subsystemAccessThroughFacadeChecker.check(declaration) + is KSPropertyDeclaration -> this.subsystemAccessThroughFacadeChecker.check(declaration) + else -> Unit + } + } + private fun checkClass(declaration: KSClassDeclaration) { this.singleSubsystemMembershipChecker.check(declaration) + this.subsystemAccessThroughFacadeChecker.check(declaration) + this.subsystemIndependentOfFacadeChecker.check(declaration) FacadeAnnotation .find(declaration) diff --git a/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/MemberSignatureTypes.kt b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/MemberSignatureTypes.kt index b3dc518e..0ef4bf75 100644 --- a/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/MemberSignatureTypes.kt +++ b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/MemberSignatureTypes.kt @@ -14,6 +14,7 @@ import com.google.devtools.ksp.symbol.KSValueParameter import com.google.devtools.ksp.symbol.Origin import pro.vlprojects.semantic.ksp.helper.getDeclaredClasses import pro.vlprojects.semantic.ksp.helper.hasAnnotation +import pro.vlprojects.semantic.ksp.helper.isSynthetic internal class MemberSignatureTypes private constructor(private val declaration: KSClassDeclaration) { @@ -38,13 +39,61 @@ internal class MemberSignatureTypes private constructor(private val declaration: return functionTypes + propertyTypes + companionTypes } - private fun findFunctionTypes(function: KSFunctionDeclaration) = function.parameters - .map(KSValueParameter::type) + fun findAll() = this.findTaken() + this.findReturned() + + // Generated members repeat declarations checked elsewhere: properties of a data class, members of a delegate. + fun findTaken(): Sequence { + val functionTypes = this.declaration + .getDeclaredFunctions() + .filterNot(KSFunctionDeclaration::isSynthetic) + .flatMap(::findParameterTypes) + + val propertyTypes = this.declaration + .getDeclaredProperties() + .flatMap(::findPropertyTypes) + + val companionTypes = this + .findCompanions() + .map(Factory::of) + .flatMap(MemberSignatureTypes::findTaken) + + return functionTypes + propertyTypes + companionTypes + } + + private fun findReturned(): Sequence { + val functionTypes = this.declaration + .getDeclaredFunctions() + .filterNot(KSFunctionDeclaration::isSynthetic) + .filterNot(KSFunctionDeclaration::isConstructor) + .mapNotNull(KSFunctionDeclaration::returnType) + + val companionTypes = this + .findCompanions() + .map(Factory::of) + .flatMap(MemberSignatureTypes::findReturned) + + return functionTypes + companionTypes + } + + private fun findFunctionTypes(function: KSFunctionDeclaration) = this + .findParameterTypes(function) .plus(function.returnType) + .filterNotNull() + + // A parameter that declares a property is checked once, as the property. + private fun findParameterTypes(function: KSFunctionDeclaration) = function.parameters + .filterNot(::isProperty) + .map(KSValueParameter::type) .plus(function.extensionReceiver) .filterNotNull() .asSequence() + private fun isProperty(parameter: KSValueParameter) = when { + parameter.isVal -> true + parameter.isVar -> true + else -> false + } + private fun findPropertyTypes(property: KSPropertyDeclaration) = sequenceOf(property.type, property.extensionReceiver).filterNotNull() diff --git a/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemAccessThroughFacadeChecker.kt b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemAccessThroughFacadeChecker.kt new file mode 100644 index 00000000..55c98624 --- /dev/null +++ b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemAccessThroughFacadeChecker.kt @@ -0,0 +1,90 @@ +package pro.vlprojects.semantic.pattern.structural.facade + +import com.google.devtools.ksp.processing.KSPLogger +import com.google.devtools.ksp.symbol.KSClassDeclaration +import com.google.devtools.ksp.symbol.KSDeclaration +import com.google.devtools.ksp.symbol.KSFunctionDeclaration +import com.google.devtools.ksp.symbol.KSPropertyDeclaration +import com.google.devtools.ksp.symbol.KSTypeReference +import com.google.devtools.ksp.symbol.KSValueParameter +import pro.vlprojects.semantic.ksp.helper.getReferencedClasses +import pro.vlprojects.semantic.ksp.helper.getShortName + +internal class SubsystemAccessThroughFacadeChecker(private val logger: KSPLogger) { + + fun check(declaration: KSClassDeclaration) { + when (val annotation = FacadeAnnotation.find(declaration)) { + null -> this.checkClass(declaration) + else -> this.checkFacade(declaration, annotation) + } + } + + fun check(declaration: KSFunctionDeclaration) = this + .findFunctionTypes(declaration) + .let { types -> this.checkTopLevel(declaration, types) } + + fun check(declaration: KSPropertyDeclaration) = this + .findPropertyTypes(declaration) + .let { types -> this.checkTopLevel(declaration, types) } + + private fun checkFacade(declaration: KSClassDeclaration, annotation: FacadeAnnotation) { + val facadeName = declaration.getShortName() + val subsystemNames = annotation.getSubsystemNames() + + MemberSignatureTypes + .of(declaration) + .findAll() + .forEach { type -> this.checkType("Facade $facadeName", type, subsystemNames) } + } + + // A companion is checked with the class it belongs to, as a part of it. + private fun checkClass(declaration: KSClassDeclaration) { + if (!declaration.isCompanionObject) { + this.checkMemberTypes(declaration) + } + } + + private fun checkMemberTypes(declaration: KSClassDeclaration) { + val className = declaration.getShortName() + + val subsystemNames = SubsystemMembership + .findAll(declaration) + .map(SubsystemMembership::getSubsystemName) + .toSet() + + MemberSignatureTypes + .of(declaration) + .findAll() + .forEach { type -> this.checkType(className, type, subsystemNames) } + } + + private fun checkTopLevel(declaration: KSDeclaration, types: Sequence) { + val name = declaration.getShortName() + + types.forEach { type -> this.checkType(name, type, emptySet()) } + } + + private fun checkType(subject: String, type: KSTypeReference, allowedNames: Set) = type + .getReferencedClasses() + .forEach { dependency -> + val dependencyName = dependency.getShortName() + + SubsystemMembership + .findAll(dependency) + .filterNot { membership -> membership.getSubsystemName() in allowedNames } + .map(SubsystemMembership::describe) + .forEach { subsystemName -> + this.logger.error("$subject names $dependencyName of $subsystemName past a facade", type) + } + } + + private fun findFunctionTypes(function: KSFunctionDeclaration) = function.parameters + .map(KSValueParameter::type) + .plus(function.returnType) + .plus(function.extensionReceiver) + .filterNotNull() + .asSequence() + + private fun findPropertyTypes(property: KSPropertyDeclaration) = + sequenceOf(property.type, property.extensionReceiver).filterNotNull() +} diff --git a/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemIndependentOfFacadeChecker.kt b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemIndependentOfFacadeChecker.kt new file mode 100644 index 00000000..14c5b87c --- /dev/null +++ b/design/pattern/ksp/src/main/kotlin/pro/vlprojects/semantic/pattern/structural/facade/SubsystemIndependentOfFacadeChecker.kt @@ -0,0 +1,48 @@ +package pro.vlprojects.semantic.pattern.structural.facade + +import com.google.devtools.ksp.processing.KSPLogger +import com.google.devtools.ksp.symbol.KSClassDeclaration +import com.google.devtools.ksp.symbol.KSTypeReference +import pro.vlprojects.semantic.ksp.helper.getReferencedClasses +import pro.vlprojects.semantic.ksp.helper.getShortName +import pro.vlprojects.semantic.ksp.helper.hasAnnotation + +internal class SubsystemIndependentOfFacadeChecker(private val logger: KSPLogger) { + + // A companion is checked with the class it belongs to, as a part of it. + fun check(declaration: KSClassDeclaration) { + when { + declaration.isCompanionObject -> Unit + declaration.hasAnnotation(Facade::class) -> Unit + else -> this.checkTakenTypes(declaration) + } + } + + private fun checkTakenTypes(declaration: KSClassDeclaration) { + val className = declaration.getShortName() + val memberships = SubsystemMembership.findAll(declaration) + + MemberSignatureTypes + .of(declaration) + .findTaken() + .forEach { type -> this.checkTakenType(className, type, memberships) } + } + + private fun checkTakenType(className: String, type: KSTypeReference, memberships: List) = type + .getReferencedClasses() + .forEach { dependency -> + val dependencyName = dependency.getShortName() + + val facadeSubsystemNames = FacadeAnnotation + .find(dependency) + ?.getSubsystemNames() + .orEmpty() + + memberships + .filter { membership -> membership.getSubsystemName() in facadeSubsystemNames } + .map(SubsystemMembership::describe) + .forEach { subsystemName -> + this.logger.error("$className of $subsystemName takes its facade $dependencyName", type) + } + } +} diff --git a/design/pattern/ksp/src/test/kotlin/pro/vlprojects/semantic/pattern/integration/structural/facade/FacadeSymbolProcessorTests.kt b/design/pattern/ksp/src/test/kotlin/pro/vlprojects/semantic/pattern/integration/structural/facade/FacadeSymbolProcessorTests.kt index c21358a5..54b5f843 100644 --- a/design/pattern/ksp/src/test/kotlin/pro/vlprojects/semantic/pattern/integration/structural/facade/FacadeSymbolProcessorTests.kt +++ b/design/pattern/ksp/src/test/kotlin/pro/vlprojects/semantic/pattern/integration/structural/facade/FacadeSymbolProcessorTests.kt @@ -84,6 +84,218 @@ class FacadeSymbolProcessorTests { } } + @Test + fun `a client that takes a class of a subsystem fails the build`() = this.assertCompilationFails( + "class AdminFileController(private val storage: FileStorageClient)", + 2, + "AdminFileController names FileStorageClient of @FileSubsystem past a facade", + ) + + @Test + fun `a client names no class that carries a marker of a supertype`() = this.assertCompilationFails( + "interface FileList : List\nclass FileListing(private val files: FileList)", + 3, + "FileListing names FileList of @FileSubsystem through FileEntity past a facade", + ) + + @ParameterizedTest + @ValueSource( + strings = [ + "class FileCleaner(storage: FileStorageClient)", + "class FileCleaner { fun clean(storage: FileStorageClient) = Unit }", + "class FileCleaner { fun FileStorageClient.clean() = Unit }", + "class FileCleaner { val storage: FileStorageClient get() = TODO() }", + ], + ) + fun `a client names no type of a subsystem in its signatures`(source: String) = this.assertCompilationFails( + source, + 2, + "FileCleaner names FileStorageClient of @FileSubsystem past a facade", + ) + + @Test + fun `a result of a function counts`() = this.assertCompilationFails( + "class FileFinder {\nfun find(): FileEntity = TODO()\n}", + 3, + "FileFinder names FileEntity of @FileSubsystem past a facade", + ) + + @Test + fun `a top-level function names no type of a subsystem`() = this.assertCompilationFails( + "fun findFile(): FileEntity = TODO()", + 2, + "findFile names FileEntity of @FileSubsystem past a facade", + ) + + @Test + fun `a top-level property names no type of a subsystem`() = this.assertCompilationFails( + "val defaultFile: FileEntity get() = TODO()", + 2, + "defaultFile names FileEntity of @FileSubsystem past a facade", + ) + + @Test + fun `a class of a subsystem takes no class of another one`() = this.assertCompilationFails( + "@BillingSubsystem\nclass InvoiceStorage(private val storage: FileStorageClient)", + 3, + "InvoiceStorage names FileStorageClient of @FileSubsystem past a facade", + ) + + @Test + fun `a facade names no other subsystem past the facade of it`() = this.assertCompilationFails( + """ + @BillingSubsystem + class InvoiceEntity + @Facade(FileSubsystem::class) + class FileInvoiceFacade(private val invoice: InvoiceEntity) + """.trimIndent(), + 5, + "Facade FileInvoiceFacade names InvoiceEntity of @BillingSubsystem past a facade", + ) + + @Test + fun `a client of Java follows the same rules`() { + val javaFile = SourceFile.java( + "JavaFileAdmin.java", + """ + class JavaFileAdmin { + private FileStorageClient storage; + } + """, + ) + + this + .compileSources(javaFile) + .let { result -> + this.assertCompilationFails( + result, + "JavaFileAdmin.java:2: JavaFileAdmin names FileStorageClient of @FileSubsystem past a facade", + ) + } + } + + @Test + fun `a companion is a part of its class`() { + val result = this.compile( + """ + @Facade(FileSubsystem::class) + class FileArchiveFacade { + companion object { + private val defaultFile = FileEntity() + } + } + + @FileSubsystem + class FileVersion private constructor() { + companion object Factory { + fun of() = FileVersion() + } + } + """, + ) + + assertEquals(ExitCode.OK, result.exitCode, result.messages) + } + + @Test + fun `a companion that is a facade is no part of its class`() { + val result = this.compile( + """ + class FileModule { + @Facade(FileSubsystem::class) + companion object { + private val defaultFile = FileEntity() + } + } + """, + ) + + assertEquals(ExitCode.OK, result.exitCode, result.messages) + } + + @Test + fun `a nested class is a client of its own`() = this.assertCompilationFails( + "class FileModule {\nclass FileCleaner(private val file: FileEntity)\n}", + 3, + "FileModule.FileCleaner names FileEntity of @FileSubsystem past a facade", + ) + + @Test + fun `a class of a subsystem takes no facade of its own subsystem`() = this.assertCompilationFails( + "@FileSubsystem\nclass QuotaService(private val facade: FileFacade)", + 3, + "QuotaService of @FileSubsystem takes its facade FileFacade", + ) + + @Test + fun `a companion of a client names no type of a subsystem`() = this.assertCompilationFails( + "class FileFinder {\ncompanion object {\nfun find(): FileEntity = TODO()\n}\n}", + 4, + "FileFinder names FileEntity of @FileSubsystem past a facade", + ) + + @Test + fun `a companion of a class of a subsystem takes no facade of it`() = this.assertCompilationFails( + """ + @FileSubsystem + class QuotaService { + companion object Factory { + fun of(facade: FileFacade) = QuotaService() + } + } + """.trimIndent(), + 5, + "QuotaService of @FileSubsystem takes its facade FileFacade", + ) + + @Test + fun `a class with a marker of a supertype names the types of its subsystem`() { + val result = this.compile("interface FileList : List {\nfun findLatest(): FileEntity\n}") + + assertEquals(ExitCode.OK, result.exitCode, result.messages) + } + + @Test + fun `a member that a data class generates is checked once, as its property`() { + val result = this.compile("data class FileRow(val file: FileEntity)") + + val error = "$VIOLATION_FILE:2: FileRow names FileEntity of @FileSubsystem past a facade" + + val errorCount = result.messages + .lines() + .count { line -> error in line } + + assertEquals(1, errorCount, result.messages) + } + + @Test + fun `clients and classes of another subsystem take a facade`() { + val result = this.compile( + """ + class FileController(private val facade: FileFacade) + + @BillingSubsystem + class InvoiceArchive(private val files: FileFacade) + """, + ) + + assertEquals(ExitCode.OK, result.exitCode, result.messages) + } + + @Test + fun `a configuration of a subsystem returns its facade`() { + val result = this.compile( + """ + @FileSubsystem + class FileConfiguration { + fun fileFacade(storage: FileStorageClient, file: FileEntity) = FileFacade(storage, file) + } + """, + ) + + assertEquals(ExitCode.OK, result.exitCode, result.messages) + } + @ParameterizedTest @ValueSource( strings = [