feat(JuliaStrings/utf8proc): add utf8proc v2.9.0 LLAR formula - #118
feat(JuliaStrings/utf8proc): add utf8proc v2.9.0 LLAR formula#118fennoai[bot] wants to merge 1 commit into
Conversation
Translate the Conan Center utf8proc recipe (snapshot
ffe30df101afd4dc95aac2f14b25bf345e64d7be, version 2.9.0) into an
idiomatic LLAR Formula for JuliaStrings/utf8proc.
- versions.json: no dependencies (utf8proc is a self-contained C library;
upstream v2.9.0 declares no third-party requirements).
- Utf8proc_cmp.gox: semver comparator for the leading-"v" release tags.
- v2.9.0/Utf8proc_llar.gox:
- onBuild uses the CMake helper to build the static archive (the upstream
and Conan default), pinning CMAKE_POLICY_VERSION_MINIMUM=3.5 and
CMAKE_POLICY_DEFAULT_CMP0042=NEW as the recipe does for pre-2.10.0, with
fPIC on to match Conan's default and testing off to stay hermetic.
- Metadata is derived from the installed libutf8proc.pc via pkg-config,
plus -DUTF8PROC_STATIC to mirror the Conan static package_info branch.
- onTest compiles and runs a consumer modelled on the Conan test_package
(utf8proc_version / utf8proc_unicode_version) in a build tree independent
of the onBuild scratch dir, so it also passes on a cache hit.
fromVer is pinned to v2.9.0: the earlier recipe versions (e.g. v2.5.0) use a
different CMake floor and do not install a pkg-config file, so their build
contract is not verified here. Add a lower threshold once those are checked.
Verified with `llar test` (cache-miss and cache-hit) and `llar make --json`
on linux/amd64: static lib, header, and libutf8proc.pc install; the consumer
prints utf8proc 2.9.0 / Unicode 15.1.0.
Co-authored-by: fennoai[bot] <231223108+fennoai[bot]@users.noreply.github.com>
Co-authored-by: MeteorsLiu <17515813+MeteorsLiu@users.noreply.github.com>
There was a problem hiding this comment.
Review summary
This PR adds a new JuliaStrings/utf8proc formula (build + test + semver comparator) and refactors madler/zlib onto the current single-context Formula API. The zlib refactor, the _cmp.gox, versions.json, and the large docs/skill extraction all look correct and internally consistent (mirrored .claude/.agents copies match, internal links resolve, docs describe the new API rather than the removed error-return surface).
One important correctness issue in the utf8proc onBuild metadata step, plus one minor robustness note — both inline.
Non-blocking observations (no change required):
onTestrecompiles the C consumer on every run including cache hits. This is intentional per the inline comment (cache-hit/cache-miss parity) and the compile is tiny; noted only for awareness.SKILL.mdfrontmatter differs between the.claude(hasargument-hint/allowed-tools) and.agentscopies. Likely deliberate since.agentsusesagents/openai.yamlfor interface metadata — worth a quick confirm.
Findings without inline locations
JuliaStrings/utf8proc/v2.9.0/Utf8proc_llar.gox:86: Minor robustness: this line usessh -conly to run a fixed binary with no shell features. Invoking it directly withexec "'" ...is unnecessary —exec binwould run the binary without a shell round-trip and sidesteps the single-quote escaping concern entirely (single-quoting protects against a|in the matrix suffix but not an embedded'in the path). Not exploitable given these are trusted sandbox paths; purely a cleanliness/robustness note.
| // the Conan package_info static branch. | ||
| meta = strings.trimSpace(meta + " -DUTF8PROC_STATIC") | ||
| ctx.setMetadata meta | ||
| } |
There was a problem hiding this comment.
Missing lastErr check before reading output. After a capout block, the reference convention requires validating the command result (if lastErr != nil { panic lastErr }) before consuming output — the onTest sections below do exactly this, and so does the reference's complete example.
Here, if pkg-config fails (missing .pc, wrong name, or not installed), the hook does not error: output is empty/stale, so metadata is silently set to just -DUTF8PROC_STATIC, producing an install with broken consumer link/compile flags instead of a clear build failure.
capout => {
exec "pkg-config", "--libs", "--cflags", "libutf8proc"
}
if lastErr != nil {
panic lastErr
}
meta := strings.trimSpace(output)
Closes #22.
Translates the Conan Center
utf8procrecipe (snapshotffe30df1, version2.9.0) into an idiomatic LLAR Formula forJuliaStrings/utf8proc.Files
JuliaStrings/utf8proc/versions.json— no dependencies (utf8proc is a self-contained single-file C library; upstreamv2.9.0declares no third-party requirements).JuliaStrings/utf8proc/Utf8proc_cmp.gox— semver comparator for the leading-vrelease tags.JuliaStrings/utf8proc/v2.9.0/Utf8proc_llar.gox:CMAKE_POLICY_VERSION_MINIMUM=3.5andCMAKE_POLICY_DEFAULT_CMP0042=NEWexactly as the recipe does for pre-2.10.0 releases,CMAKE_POSITION_INDEPENDENT_CODE=ONto match Conan's defaultfPIC=True, andUTF8PROC_ENABLE_TESTING=OFFto keep the build hermetic.libutf8proc.pcviapkg-config, plus-DUTF8PROC_STATICto mirror the Conan staticpackage_infobranch.test_package(utf8proc_version/utf8proc_unicode_version) in a build tree independent of theonBuildscratch dir, so it also passes on a cache hit.Version boundary
fromVeris pinned tov2.9.0. The earlier versions served by the same Conan folder (e.g.v2.5.0) use a lower CMake floor (2.8.12) and do not install a pkg-config file, so their build contract differs and is not verified here. A lower threshold should be added only after those revisions are inspected and tested — per the translation guidance to add a threshold rather than claim an unverified range.Notes on options
The Conan
shared/fPICoptions were reviewed. In the currentllar, matrix--optionoverrides propagate to the cache key/install path but are not injected into the formula body (target.optionsonly ever reflectsdefaults, and there is no public accessor for the matrix string). Rather than expose asharedtoggle that would silently always build static, this formula builds the static default (matching Conanshared=False) and documentsfPIC=Truebehavior directly. Asharedoption can be added once option selection reachesonBuild.Validation
Built
llarfrom source and ran onlinux/amd64:The install produces
include/utf8proc.h,lib/libutf8proc.a, andlib/pkgconfig/libutf8proc.pc; the consumer printsutf8proc version: 2.9.0andUnicode version: 15.1.0. No systemlibutf8procis present, confirming the test links the freshly built artifact.