Move SSD append note helper to typed Kotlin
ober
94b1170f6386b7e9f1281b9ab569883949febd7c
--- a/.build.yml +++ b/.build.yml @@ -5,7 +5,7 @@ packages: - make=4.4.1-r4 sources: # Build dependency: full immutable commit, mirrored in dependencies.lock.json. - - "https://git.sr.ht/~lisp/jerboa#f45108d14ad656e9d8ca9b8e1e62fa3c13737550" + - "https://git.sr.ht/~lisp/jerboa#ac1666a396e49cc6cc7df24669fc68a7075e8439" # The second source is the build subject selected by the SourceHut submitter. - https://git.sr.ht/~lisp/jerboa-android tasks: @@ -14,6 +14,6 @@ tasks: test "$(apk info -v chez-scheme)" = chez-scheme-10.3.0-r2 test "$(apk info -v git)" = git-2.54.0-r0 test "$(apk info -v make)" = make-4.4.1-r4 - test "$(git -C ../jerboa rev-parse HEAD)" = f45108d14ad656e9d8ca9b8e1e62fa3c13737550 - test "$(git -C ../jerboa rev-parse 'HEAD^{tree}')" = e67c73e5e76814eba949ec49ac02ea0162ce7c02 + test "$(git -C ../jerboa rev-parse HEAD)" = ac1666a396e49cc6cc7df24669fc68a7075e8439 + test "$(git -C ../jerboa rev-parse 'HEAD^{tree}')" = c131825cfad0ca160b0e7e0347157fef7ebedf1e JERBOA="chez --libdirs .:../jerboa/lib --script" make test --- a/dependencies.lock.json +++ b/dependencies.lock.json @@ -11,8 +11,8 @@ "generator_runtime": { "name": "jerboa", "repository": "https://git.sr.ht/~lisp/jerboa", - "commit": "f45108d14ad656e9d8ca9b8e1e62fa3c13737550", - "tree": "e67c73e5e76814eba949ec49ac02ea0162ce7c02" + "commit": "ac1666a396e49cc6cc7df24669fc68a7075e8439", + "tree": "c131825cfad0ca160b0e7e0347157fef7ebedf1e" }, "assurance_tools": { "osv_scanner": { --- a/full-kotlin.md +++ b/full-kotlin.md @@ -43,7 +43,7 @@ The vendored Jerboa tree already has the right starting point: Do not fork that model inside `jandroid.ss`. General Kotlin backend work belongs in Jerboa. Android project and Android DSL work belongs in `jerboa-android`. -Version caveat: this repository now pins Jerboa commit `f45108d14ad656e9d8ca9b8e1e62fa3c13737550`, tree `e67c73e5e76814eba949ec49ac02ea0162ce7c02`. Before editing compiler APIs, check out the exact pinned commit (or the intended replacement commit), rerun the typed parser/checker/core inventory, and record any differences. Do not assume two Jerboa snapshots expose identical IR. +Version caveat: this repository now pins Jerboa commit `ac1666a396e49cc6cc7df24669fc68a7075e8439`, tree `c131825cfad0ca160b0e7e0347157fef7ebedf1e`. Before editing compiler APIs, check out the exact pinned commit (or the intended replacement commit), rerun the typed parser/checker/core inventory, and record any differences. Do not assume two Jerboa snapshots expose identical IR. ### 2.3 `~/sfb` source requirements --- a/scripts/verify-supply-chain.sh +++ b/scripts/verify-supply-chain.sh @@ -3,8 +3,8 @@ set -eu repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd -P) lock="$repo/dependencies.lock.json" -jerboa_commit=f45108d14ad656e9d8ca9b8e1e62fa3c13737550 # gitsafe:ignore -jerboa_tree=e67c73e5e76814eba949ec49ac02ea0162ce7c02 # gitsafe:ignore +jerboa_commit=ac1666a396e49cc6cc7df24669fc68a7075e8439 # gitsafe:ignore +jerboa_tree=c131825cfad0ca160b0e7e0347157fef7ebedf1e # gitsafe:ignore gradle_sha=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78 jdk_macos_sha=8fa1eff40bb637a33613b2ccb8b12c70dc3661cc22cf8e784943715769a05336 jdk_linux_sha=d8afc263758141a66e0e3aafc321e783f7016696f4eaea067d340a269037d331 --- a/templates/ssd-review.ss +++ b/templates/ssd-review.ss @@ -246,6 +246,14 @@ "shield-6" "shield"))))))))) + (typed-kotlin-file "com/sfb/ssdreview/AppendNote.kt" + (typed-library (com sfb ssdreview) + (export appendNote) + (def (appendNote (existing : String) (note : String)) : String + (if (string-blank? existing) + note + (string-append existing (string-append "; " note)))))) + (typed-kotlin-file "com/sfb/ssdreview/NativeDetection.kt" (typed-library (com sfb ssdreview) (export make-NativeDetection NativeDetection? @@ -3197,9 +3205,6 @@ " return false" " }" "" - " private fun appendNote(existing: String, note: String): String =" - " if (existing.isBlank()) note else \"$existing; $note\"" - "" " private fun normalizeOcr(value: String): String = value.uppercase()" " .replace(Regex(\"[^A-Z0-9]+\"), \" \")" " .trim()"