diff --git a/.gitignore b/.gitignore index 5f85d295e8..c43c66220c 100644 --- a/.gitignore +++ b/.gitignore @@ -135,3 +135,6 @@ pubspec.lock # Python cache __pycache__/ *.pyc + +# Claude working files +/.claude/worktrees/ diff --git a/CLAUDE.md b/CLAUDE.md index 72e0ad2277..38753d02a6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,7 +3,7 @@ ## Agent Guidelines Please read and follow all guidelines in the project's agent documentation: -- Start with the table of contents: `./agents/_TOC.md`. +- Start with the table of contents: `.agents/_TOC.md`. - Follow all linked documents from the TOC. - Apply all coding standards, formatting rules, and project conventions found in these documents. diff --git a/base/src/main/kotlin/io/spine/string/TemplateStringExts.kt b/base/src/main/kotlin/io/spine/string/TemplateStringExts.kt index 7fb57ae290..f18d2275bd 100644 --- a/base/src/main/kotlin/io/spine/string/TemplateStringExts.kt +++ b/base/src/main/kotlin/io/spine/string/TemplateStringExts.kt @@ -159,7 +159,21 @@ public fun TemplateString.requireComplete( } } -private fun Iterable.joinQuoted(): String = +/** + * Joins all placeholders in this iterable into a single string, + * separating them with commas and wrapping each placeholder name in backticks. + * + * This is a convenience method for formatting lists of placeholders + * in error messages and diagnostic output. + * + * For example, given placeholders with names `"foo"`, `"bar"`, and `"baz"`, + * this method returns: + * ``` + * `foo`, `bar`, `baz`. + * ``` + * @return A comma-separated string of quoted placeholder names. + */ +public fun Iterable.joinQuoted(): String = joinToString { it.quoted } /** diff --git a/base/src/test/kotlin/io/spine/string/TemplateStringExtsSpec.kt b/base/src/test/kotlin/io/spine/string/TemplateStringExtsSpec.kt index fe959f4839..6c52533e80 100644 --- a/base/src/test/kotlin/io/spine/string/TemplateStringExtsSpec.kt +++ b/base/src/test/kotlin/io/spine/string/TemplateStringExtsSpec.kt @@ -178,6 +178,36 @@ internal class TemplateStringExtsSpec { } } + @Nested inner class + `join placeholders into a quoted, comma-separated string` { + + @Test + fun `wrapping each name in backticks and separating with a comma and a space`() { + val placeholders = listOf(Placeholder("foo"), Placeholder("bar"), Placeholder("baz")) + placeholders.joinQuoted() shouldBe "`foo`, `bar`, `baz`" + } + + @Test + fun `producing a single backticked name for one element`() { + listOf(Placeholder("only")).joinQuoted() shouldBe "`only`" + } + + @Test + fun `producing an empty string for an empty iterable`() { + emptyList().joinQuoted() shouldBe "" + } + + @Test + fun `preserving the order of elements and supporting dotted or underscored names`() { + val placeholders = listOf( + Placeholder("my.key"), + Placeholder("my_key"), + Placeholder("myKey"), + ) + placeholders.joinQuoted() shouldBe "`my.key`, `my_key`, `myKey`" + } + } + @Test fun `format with missing placeholders`() { val template = templateString { diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt index 6e77a80e4d..0a52ff7826 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt @@ -39,7 +39,7 @@ package io.spine.dependency.local object CoreJvmCompiler { /** - * The Compiler belongs the `tools` group. + * The Compiler belongs to the `tools` group. */ const val group = Spine.toolsGroup @@ -51,7 +51,7 @@ object CoreJvmCompiler { /** * The version to be used for integration tests. */ - const val version = "2.0.0-SNAPSHOT.062" + const val version = "2.0.0-SNAPSHOT.063" /** * The ID of the Gradle plugin. diff --git a/buildSrc/src/test/kotlin/io/spine/gradle/report/license/DependencyReportOutputTest.kt b/buildSrc/src/test/kotlin/io/spine/gradle/report/license/DependencyReportOutputTest.kt index b17c66f069..9c36b218bc 100644 --- a/buildSrc/src/test/kotlin/io/spine/gradle/report/license/DependencyReportOutputTest.kt +++ b/buildSrc/src/test/kotlin/io/spine/gradle/report/license/DependencyReportOutputTest.kt @@ -57,8 +57,6 @@ class DependencyReportOutputTest { @Test fun `write the generated POM under docs-dependencies`() { - projectDir.resolve("pom.xml").writeText("legacy POM") - PomGenerator.applyTo(project) project.tasks.named("generatePom").get() @@ -70,8 +68,6 @@ class DependencyReportOutputTest { @Test fun `merge license reports under docs-dependencies`() { - projectDir.resolve("dependencies.md").writeText("legacy report") - project.pluginManager.apply(BasePlugin::class.java) val subproject = subproject("sub") LicenseReporter.generateReportIn(subproject) diff --git a/config b/config index fbec334fc0..c3ab20a7fc 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit fbec334fc0caa4bfd7f39aab0267ee058494fafa +Subproject commit c3ab20a7fc8cf1464ff45651a19935b5b7aeaea7 diff --git a/docs/dependencies/dependencies.md b/docs/dependencies/dependencies.md index 20f4e7dd16..aadbf54dc0 100644 --- a/docs/dependencies/dependencies.md +++ b/docs/dependencies/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine:spine-annotations:2.0.0-SNAPSHOT.388` +# Dependencies of `io.spine:spine-annotations:2.0.0-SNAPSHOT.389` ## Runtime 1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 26.0.2. @@ -764,14 +764,14 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 15 21:01:29 WEST 2026** using +This report was generated on **Fri May 15 22:53:38 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine:spine-base:2.0.0-SNAPSHOT.388` +# Dependencies of `io.spine:spine-base:2.0.0-SNAPSHOT.389` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -1616,14 +1616,14 @@ This report was generated on **Fri May 15 21:01:29 WEST 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 15 21:01:29 WEST 2026** using +This report was generated on **Fri May 15 22:53:38 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine:spine-environment:2.0.0-SNAPSHOT.388` +# Dependencies of `io.spine:spine-environment:2.0.0-SNAPSHOT.389` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -2446,14 +2446,14 @@ This report was generated on **Fri May 15 21:01:29 WEST 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 15 21:01:29 WEST 2026** using +This report was generated on **Fri May 15 22:53:38 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine:spine-format:2.0.0-SNAPSHOT.388` +# Dependencies of `io.spine:spine-format:2.0.0-SNAPSHOT.389` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -3356,6 +3356,6 @@ This report was generated on **Fri May 15 21:01:29 WEST 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 15 21:01:29 WEST 2026** using +This report was generated on **Fri May 15 22:53:38 WEST 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file diff --git a/docs/dependencies/pom.xml b/docs/dependencies/pom.xml index 30c20f7c47..20ec1c5ad5 100644 --- a/docs/dependencies/pom.xml +++ b/docs/dependencies/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine base-libraries -2.0.0-SNAPSHOT.388 +2.0.0-SNAPSHOT.389 2015 diff --git a/version.gradle.kts b/version.gradle.kts index 4d0b5b19fc..c7cfc4b551 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -24,4 +24,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -val versionToPublish: String by extra("2.0.0-SNAPSHOT.388") +val versionToPublish: String by extra("2.0.0-SNAPSHOT.389")