You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove the duplicated dead mac branch in Os.detect #938
Os.detect(description: String) in core/src/commonMain/kotlin/it/unibo/tuprolog/Os.kt maps a free-form OS description (on the JVM, the os.name system property, see core/src/jvmMain/kotlin/it/unibo/tuprolog/Introspection.kt) to an Os value. Its when has the same mac branch twice:
The second branch can never match, because the first one already handles every input that contains mac. It does not change behavior, but it is dead code and looks like a copy-paste slip.
Expected
Each OS pattern appears once in Os.detect.
Possible approach
Delete the duplicate line. Optional: check whether another pattern was meant to go there (e.g. darwin or os x). Before adding darwin, note that the win branch is checked earlier and also matches "darwin". Today that cannot happen, because the only caller passes the JVM's os.name (Mac OS X on macOS).
Affected module: :core.
Original description
Os.detect contains a duplicated, dead mac match branch. Spotted during the documentation pass; not fixed in commit 5dfb787.
Triage: this is still valid on current master. The duplicated mac branch is still in core/src/commonMain/kotlin/it/unibo/tuprolog/Os.kt, since #929 (5dfb787) only added KDoc. I rewrote the description with more context and added labels.
Triage performed by Claude Code on behalf of @gciatto.
Activity
gciatto commentedon Oct 4, 2026
Triage: this is still valid on current master. The duplicated
macbranch is still incore/src/commonMain/kotlin/it/unibo/tuprolog/Os.kt, since #929 (5dfb787) only added KDoc. I rewrote the description with more context and added labels.Triage performed by Claude Code on behalf of @gciatto.