Skip to content

Commit pattern in snapshotQualifiers#606

Merged
neko-kai merged 7 commits intodevelopfrom
feature/commit-pattern-in-snapshot-qualifiers
Apr 8, 2026
Merged

Commit pattern in snapshotQualifiers#606
neko-kai merged 7 commits intodevelopfrom
feature/commit-pattern-in-snapshot-qualifiers

Conversation

@neko-kai
Copy link
Copy Markdown
Member

@neko-kai neko-kai commented Apr 7, 2026

Support <commit> in snapshotQualifiers, allows publishing versions 1.2.3-git-abcdef1 when snapshotQualifiers is set to "git-<commit>"

Fix manifests generated by Scala 3 version of the compiler

neko-kai added 4 commits April 7, 2026 16:21
Support <commit>, <commitN> placeholders in version overlay snapshot
qualifiers that resolve to the git commit hash (first N chars, default 7).
When present in a TypeScript qualifier, the automatic timestamp suffix
is suppressed. Falls back to "unknown" on git errors.

Includes unit tests for CommitHashResolver and shellspec integration
tests covering release mode, SNAPSHOT, timestamp, and commit hash
qualifiers for TypeScript, Scala, CSharp, and Go.
The Scala 3 PlatformEnumCodecs used deriveDecoder/deriveEncoder from
circe-generic which encodes sealed trait case objects as {"PLAIN": {}}
objects. This broke `-d layout=PLAIN` overrides on Scala 3 since the
decoder expected objects, not strings.

Switch Scala 3 to deriveEnumerationDecoder/Encoder from
circe-generic-extras (0.14.5-RC1, the only Scala 3 build available),
matching the Scala 2 behavior of encoding as plain strings.

Add PlatformEnumCodecsTest verifying string encoding/decoding roundtrips
for all layout enums on both Scala versions. Parameterize version overlay
integration tests to run on both Scala 2.13 and 3.
Bump circe-generic-extras from 0.14.4 to 0.14.5-RC1 (the only version
with Scala 3 artifacts) and make it available for all Scala versions
in sbtgen/Deps.scala, removing the AllScala2 restriction. Regenerated
build.sbt via sbtgen.
Extract snapshotQualifier from compiler log output to verify commit
hash resolution for Go and Protobuf (which don't embed versions in
generated files). Tighten all <commitN> patterns to assert exact
character counts instead of wildcards.
@neko-kai neko-kai requested review from Caparow and pshirshov April 7, 2026 21:31
neko-kai added 3 commits April 7, 2026 23:06
Now that both Scala 2 and 3 use the same circe-generic-extras
deriveEnumerationDecoder/Encoder, the platform-specific files are
identical. Move to shared scala/ source dir.
@neko-kai neko-kai merged commit efd844e into develop Apr 8, 2026
9 checks passed
@neko-kai neko-kai deleted the feature/commit-pattern-in-snapshot-qualifiers branch April 8, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant