Open String.toUnix() - #950
Merged
Merged
Conversation
Open `String.toUnix()` as a genuine public extension rather than a test-visibility widening: - Drop `@VisibleForTesting`. The annotation's own contract advises against applying it to `public` API, it does not restrict access, and no test calls `toUnix()` directly (tests exercise it via `toUnixPath()`). - Fix the KDoc, which inaccurately said the function is "visible for testing under Windows". The function converts Windows separators to Unix and is needed precisely on non-Windows hosts. Restore the `[Path.toUnixPath]` / `[File.toUnixPath]` cross-references. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR promotes String.toUnix() (in io/spine/io/Paths.kt) from internal to public so callers and tests can normalize Windows-style path strings on non-Windows hosts. The rest of the diff is mostly routine maintenance: version bump, regenerated dependency reports, and a mechanical config sync (including wrapper/workflows/scripts).
Changes:
- Made
String.toUnix()a public extension and adjusted its KDoc to reflect the intended usage. - Bumped project version to
2.0.0-SNAPSHOT.422and updated generated dependency documentation accordingly. - Synced config-managed assets (Gradle wrapper, workflows, scripts, config-distributed build logic) and applied minor Gradle deprecation cleanups.
Reviewed changes
Copilot reviewed 54 out of 56 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumps the publishing version to 2.0.0-SNAPSHOT.422. |
| init-submodules | Config sync: refines submodule init behavior and Git hooks routing. |
| gradlew.bat | Config sync: wrapper script text tweaks. |
| gradlew | Config sync: wrapper script text tweaks. |
| gradle/wrapper/gradle-wrapper.properties | Config sync: Gradle wrapper distribution update. |
| docs/dependencies/pom.xml | Updates published version and dependency versions in generated POM. |
| docs/dependencies/dependencies.md | Regenerates dependency/license report for new versions/timestamp. |
| buildSrc/src/test/kotlin/io/spine/gradle/VersionGradleFileSpec.kt | Config sync: adds/updates buildSrc tests around version parsing. |
| buildSrc/src/test/kotlin/io/spine/gradle/VersionComparatorSpec.kt | Config sync: adds/updates buildSrc tests around version comparison. |
| buildSrc/src/test/kotlin/io/spine/gradle/publish/MavenMetadataSpec.kt | Config sync: adds/updates buildSrc tests for Maven metadata model. |
| buildSrc/src/test/kotlin/io/spine/gradle/publish/IncrementGuardTest.kt | Config sync: expands IncrementGuard tests and Gradle task-graph wiring checks. |
| buildSrc/src/main/kotlin/module.gradle.kts | Replaces deprecated by registering with register<Delete>(...) for Gradle 9.6+. |
| buildSrc/src/main/kotlin/kmp-module.gradle.kts | Config sync: adjusts dependency forcing behavior (e.g. Dokka handling). |
| buildSrc/src/main/kotlin/jvm-module.gradle.kts | Config sync: adjusts dependency forcing behavior (e.g. Dokka handling). |
| buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts | Config sync: removes deprecated JaCoCo convention script. |
| buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts | Config sync: removes deprecated JaCoCo convention script. |
| buildSrc/src/main/kotlin/io/spine/gradle/VersionGradleFile.kt | Config sync: introduces version.gradle.kts parsing/reading helper. |
| buildSrc/src/main/kotlin/io/spine/gradle/VersionComparator.kt | Config sync: introduces semantic-ish version comparator. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyWriter.kt | Config sync: wires version comparator into dependency report generation. |
| buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt | Config sync: repository list/comment adjustments. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/MavenMetadata.kt | Config sync: extracts Maven metadata model for version checks. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/IncrementGuard.kt | Config sync: refines when/how version increment checks run and are wired. |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt | Config sync: refactors version check task into base-compare + not-published checks. |
| buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt | Config sync: reorganizes Kotlin compiler opt-ins (JVM-specific opt-in gating). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/Testcontainers.kt | Config sync: adds Testcontainers coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/storage/QueryDsl.kt | Config sync: adds QueryDSL coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/storage/PostgreSql.kt | Config sync: adds PostgreSQL driver coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/storage/MySql.kt | Config sync: adds MySQL driver coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/storage/HsqlDb.kt | Config sync: adds HSQLDB coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/storage/Hikari.kt | Config sync: adds HikariCP coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/storage/H2.kt | Config sync: adds H2 coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt | Config sync: bumps ToolBase versions. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt | Config sync: bumps Logging version. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt | Config sync: bumps CoreJvmCompiler versions. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt | Config sync: bumps CoreJvm version. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt | Config sync: bumps Compiler fallback versions and related constants. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt | Config sync: bumps Base version(s). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/PerfMark.kt | Config sync: adds PerfMark coordinates wrapper. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/IntelliJ.kt | Config sync: updates IntelliJ repo guidance in KDoc. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleCloud.kt | Config sync: bumps Google Cloud dependencies and updates links/comments. |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleApis.kt | Config sync: bumps Google API dependencies. |
| buildSrc/src/main/kotlin/io/spine/dependency/Dependency.kt | Config sync: adds Configuration.isDokka helper. |
| buildSrc/src/main/kotlin/io/spine/dependency/boms/BomsPlugin.kt | Config sync: skips BOM/forcing behaviors for Dokka configurations. |
| buildSrc/src/main/kotlin/dokka-setup.gradle.kts | Config sync: Dokka task adjustments for KMP/Javadoc publication. |
| buildSrc/src/main/kotlin/DependencyResolution.kt | Config sync: avoids forcing versions on Dokka configurations. |
| build.gradle.kts | Replaces deprecated by tasks.getting delegate with tasks.named(...). |
| base/src/main/kotlin/io/spine/io/Paths.kt | Makes String.toUnix() public and updates KDoc accordingly. |
| AGENTS.md | Config sync: updates agent/submodule bootstrap instructions. |
| .gitignore | Config sync: expands secret ignore patterns and config-managed blocks. |
| .github/workflows/secret-scan.yml | Config sync: adds/updates secret scanning workflow. |
| .github/workflows/revalidate-versions.yml | Config sync: adds workflow to revalidate open PRs on base advances. |
| .github/workflows/publish.yml | Config sync: improves publish failure reporting. |
| .github/workflows/increment-guard.yml | Config sync: enriches Version Guard workflow logic and status reporting. |
| .github/workflows/build-on-ubuntu.yml | Config sync: revises CI triggers/steps, adds swap and Codecov gating. |
| .claude/settings.json | Config sync: updates Claude Code permissions/hooks configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #950 +/- ##
===========================================
+ Coverage 0 94.02% +94.02%
===========================================
Files 0 192 +192
Lines 0 4186 +4186
Branches 0 346 +346
===========================================
+ Hits 0 3936 +3936
- Misses 0 149 +149
- Partials 0 101 +101 🚀 New features to boost your workflow:
|
armiol
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Opens
String.toUnix()(inio/spine/io/Paths.kt) frominternalto afirst-class
publicextension:Why
We need a function which converts Windows path to the Unix form that we use
as a canonic form of the paths. One common usage scenario is assertions in tests.
Also in this branch (routine maintenance)
by tasks.gettingdelegate in
build.gradle.ktswithtasks.named(...), andby registeringin
buildSrc/module.gradle.ktswithregister<Delete>(...)(Gradle 9.6).jacoco-kmm-jvm/jacoco-kotlin-jvmconvention scripts.configsubmodule and the files itdistributes (workflows,
buildSrcdependency catalog, wrapper,init-submodules).