Pass the git commit into the wasm build so it stops reporting unknown - #113
Merged
Conversation
deka_compiler_metadata() exposes SOURCE_COMMIT, which reads DEKA_SOURCE_COMMIT via option_env! at compile time and falls back to the literal string "unknown" when it is unset. The release workflow never set it, so every published wasm has reported source_commit=unknown -- visible in the release log as [hats build] wasm compiler version=0.8.1 source_commit=unknown and rendered by testsuite.deka.gg as "dsc v0.8.0@unknown", where the site assumed a truthy value was a real commit and sliced it to seven characters. The value is available as github.sha in the job that builds the artifact.
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.
testsuite.deka.gg has been showing
dsc v0.8.0@unknown. This is why.deka_compiler_metadata()exposesSOURCE_COMMIT:option_env!reads at compile time and falls back to the literal string"unknown"when the variable is unset. The release workflow never set it, so every published wasm has carriedsource_commit=unknown— visible in the release log as:The value is already available as
github.shain the job that builds the artifact, so this passes it through.Note on the other half
The site compounds it:
HatsGrid.tsxrenders@{wasmSourceCommit.slice(0, 7)}guarded only by truthiness, and"unknown"is truthy — so a placeholder gets displayed as though it were data. That is fixed separately in the testsuite repo, and it is worth fixing on both sides: this PR makes the value real, and the site guard stops a future placeholder being rendered as a commit.Effective from the next release; already-published artifacts keep the baked-in
unknown.-claude