Skip to content

Swift-Liquid 2.0.0

Latest

Choose a tag to compare

@ThorFuchs ThorFuchs released this 14 Nov 11:52
· 32 commits to main since this release
390016a

Swift-Liquid 2.0.0

Performance qualification exception: The maintainer authorized this release with the performance and matched-performance release gates not run after repeated host-admission failures. No 2.0.0 benchmark comparison or performance verdict is available. The standard nine-lane release packager did not validate this release.

Swift-Liquid 2.0.0 advances the dependency-free Swift engine toward Shopify's
open-source Liquid behavior. It adds explicit template composition and
inspection APIs, improves error locations and parser compatibility, and makes
independent conformance evidence easier to inspect. The major version reflects
changes to existing rendering behavior; review the upgrade notes below.

Swift tools and compiler 6.4 or later are required, using Swift language mode 6.
The root package continues to provide one Liquid library and one liquid
executable, with no package dependencies.

Upgrading from 1.x

  • Partial names: the default source-dictionary APIs evaluate include names
    as Liquid expressions, following Shopify. A simple name can therefore select
    a value from the context rather than being treated as a literal registry key.
    The explicit byte-exact registry retains its
    documented literal-first selection profile.
  • When partials are parsed: source dictionaries admit all supplied source
    bytes against the shared limit, then parse a selected partial on first use
    within the render. An invalid unused partial no longer necessarily fails the
    render. The exact registry retains eager preparation.
  • Isolated render: original host inputs remain visible in the isolated
    partial, while caller assignments, captures, loop locals and counters do not
    cross into it. Explicit bindings shadow host inputs. include retains shared
    scope and is not allowed inside a render subtree.
  • Diagnostics and edge cases: parser modes, locations, errors, filtering,
    arithmetic and control flow include corrections toward the pinned Ruby
    reference. Applications that match error text or rely on prior edge-case
    behavior should exercise their templates during migration.

See the language contract, render-global decision
and errors guide for the detailed boundaries.

Explicit composition and system values

LiquidTemplateRegistry stores immutable raw or parsed partials by exact UTF-8
name, with bounded admission, rendering and dependency inspection. The source
partial APIs also accept an explicit host name resolver; neither option performs
implicit file or network I/O. Engines and parsed templates remain Sendable,
and mutable evaluation state belongs to each invocation.

The opt-in closedSystemV1 extension adds a bounded resident system environment
for applications that need explicit descriptors and representations. It is a
separate extension profile, not a Shopify language feature. Supplied identities
are host assertions: Liquid does not certify Content provenance or authorize a
host output placement. See closed system environment
and exact registry rendering.

Conformance and evidence

The 1,098 Golden Liquid cases retain their pinned bytes, licenses and parser
modes. The independent Shopify liquid-spec track uses Shopify's JSON-RPC
protocol, a pinned suite and a separate pinned Ruby reference. On the recorded
57583aa source snapshot, 4,682 variants matched, five mismatched for both
Swift-Liquid and the Ruby reference, and 425 were not executed. These are results
for the configured suites and adapter, not a claim of complete Shopify conformance.

The original suite verdict remains failed for the five conflicts reported in
liquid-spec issue #170.
The separate reviewed profile reports zero unexpected failures without turning
those conflicts or unexecuted cases into passes. The case-by-case review
records the current adapter boundary for every unexecuted variant. A future
suite revision, changed fixture, or changed outcome requires reassessment.
Storefront objects, hosted-theme features and arbitrary Ruby host objects remain
outside the dependency-free core or the current adapter's transport.

The package retains public consumer tests, structured Swift Testing evidence,
sanitizer and simulator compilation gates, Ruby-reference comparison, compiled
DocC and a reproducible clean-source archive. Runtime qualification covers the
recorded macOS and Swift toolchain; simulator compilation is not device runtime
qualification. See conformance and testing.

Measurements and release assets

The usual release process requires nine source-bound lanes. For this release, the maintainer waived the two unrun timing lanes and their benchmark review. Seven non-timing lanes passed for the exact main commit; see the qualification archive and CI run. No 2.0.0 performance or speedup claim is made.

When published, the release includes the tracked source archive, compiled DocC
archive, qualification evidence and SHA256SUMS. Verify the checksums before
extracting the downloads. Select a published version from the
releases page; the CLI for
this version reports Swift-Liquid 2.0.0.

Exact release source: 390016a96a64a558bdc7844a0a456bf601156307 (tree 6c78358181e62aced96109870e2f09b11ed1be01). The included qualification archive records the waiver, passed evidence, independent conformance results and actual host-admission observations.