Skip to content

Resync sur upstream Typst 0.15.1 (104 commits) - #2

Merged
Maxanox merged 106 commits into
mainfrom
chore/sync-upstream-2026-09
Sep 19, 2026
Merged

Maxanox merged 106 commits into
mainfrom
chore/sync-upstream-2026-09

Conversation

@Maxanox

@Maxanox Maxanox commented Sep 19, 2026

Copy link
Copy Markdown

Merge de typst/typst@094b9634d (0.15.1) dans le fork. Point de fork : 6516661f2 (2026-07-07). 104 commits upstream, 33 à nous.

Est-ce que ça casse quelque chose

Non. La suite de tests d'upstream passe intégralement sur le fork mergé : 3779 passed, 0 failed. Les 31 tests typst-cnd passent, et tous les gates de dev/ci-checks.sh aussi.

Un seul conflit (Cargo.toml, versions). Les quatre déviations fork-locales ont mergé textuellement, mais un merge propre ne garantit pas qu'elles soient vivantes : le canari inline_boxes_are_absorbed_and_floats_are_not (fixture inline_boxes_and_floats.typ) exerce le tampon foreground et l'absorption de box dans un même document, et il passe.

Changements d'API à adapter

  • Set rules for default document format options typst/typst#8496 — les formats d'export deviennent explicites : Library::builder([...]) prend les formats à enregistrer, et Document gagne options(). Piège non évident : les bindings pdf.* (pdf.embed, pdf.header-cell) étaient définis inconditionnellement avant. Ne rien enregistrer aurait refusé des documents que l'exporteur CND acceptait, donc typst-cnd enregistre typst_pdf::FORMAT. typst-ide-wasm n'enregistre rien : un éditeur qui complète ce que le pipeline refuse est le mauvais sens, l'inverse est bénin, et ça évite de gonfler le bundle wasm.
  • Store required features in bindings typst/typst#8599 — Display for Feature est exhaustif, donc CndSemantics a besoin d'un bras. FromStr garde son _ => Err(()) et est délibérément laissé tel quel : il parse --feature <nom>, et la variante change le layout, donc elle doit rester inatteignable depuis l'export PDF/HTML/SVG. Commenté sur place.
  • ArtifactElem : typst_library::pdf → typst_library::model.
  • Make IdeWorld::files more flexible typst/typst#8699 — IdeWorld::files prend (base, prefix) et rend des VirtualPath.

typst#8728 a changé le supplément français de heading de « Chapitre » à « Section » ; ref_text_spans_are_codepoint_offsets figeait l'ancien mot. L'invariant testé est l'arithmétique codepoint-vs-octet, que l'espace insécable exerce toujours.

Non-régression sur corpus réel

Les 40 documents nordwind-tech produisent un .cnd identique avant/après (ids Uuid::new_v4 normalisés, built_at retiré). C'est une information, pas un résultat vide :

La raison de fond : git log sur introspection/, realize/ et model/ ne rend que 7 commits, tous docs, formats ou dépréciations. Les zones dont typst-cnd dépend n'ont quasiment pas bougé.

Coût à connaître

typst-cnd tire désormais typst-pdf → krilla, absent de son arbre de dépendances auparavant. Le binaire construit par services/indexer/Dockerfile en hérite ; l'impact sur le temps de build de l'image n'a pas été mesuré.

dev/ci-checks.sh

Deux gates avaient dérivé : le clippy --no-default-features est passé d'un run workspace-wide à un run par crate (l'unification des features masquait des erreurs), et min-version a gagné --all-targets --all-features (typst#8804). La MSRV reste 1.92 ; c'est le toolchain des jobs principaux qui monte à 1.98.

🤖 Generated with Claude Code

cady-b and others added 30 commits July 10, 2026 09:06
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Martin Haug <mhaug@live.de>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
The tagged commit itself is on the 0.15 branch.
Co-authored-by: Tobias Schmitz <tobiasschmitz2001@gmail.com>
TiggeZaki and others added 29 commits August 27, 2026 16:46
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Signed-off-by: cuishuang <imcusg@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Karol Szumiło <kszumilo@mimuw.edu.pl>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
104 upstream commits since 6516661 (2026-07-07). The four fork-local
deviations into Typst core all merged textually; the fixture test
`inline_boxes_are_absorbed_and_floats_are_not` confirms the two that
change behaviour (realize + page foreground) are still live.

Four upstream API changes needed adapting:

- typst#8496 registers export formats explicitly: `Library::builder` now takes
  the formats to register, and `Document` gained `options()`. `typst-cnd`
  registers `typst_pdf::FORMAT` because the `pdf.*` bindings used to be
  defined unconditionally — omitting it would reject documents the CND
  exporter accepted before. `typst-ide-wasm` registers none: it only ever
  answers IDE queries, and pulling `typst-pdf` in would bloat the wasm
  bundle.
- typst#8599 added `Display for Feature`, which is exhaustive, so
  `CndSemantics` needs an arm. `FromStr` keeps its catch-all and is
  deliberately left alone — it backs `--feature <name>`, and the variant
  changes layout, so it must stay unreachable from PDF/HTML/SVG output.
- `ArtifactElem` moved from `typst_library::pdf` to
  `typst_library::model`.
- typst#8699 widened `IdeWorld::files` to take the base file and a prefix and
  to return virtual paths.

typst#8728 changed the French `heading` supplement from "Chapitre" to
"Section"; `ref_text_spans_are_codepoint_offsets` asserted the old word.
The invariant it tests is the codepoint-vs-byte offset arithmetic, which
the non-breaking space still exercises.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two gates drifted in the 104 upstream commits this script is meant to
mirror:

- the `--no-default-features` clippy run is now one per crate that has
  cargo features (typst-cli, typst-kit, typst-timing) instead of one
  workspace-wide run, because feature unification across the workspace
  was masking errors;
- `min-version` gained `--all-targets --all-features` (typst#8804), so the
  `check` gate it is documented as mirroring takes them too.

The MSRV is still 1.92; it is the main jobs' toolchain that moved to
1.98, which the header now says, since a lint CI reports may not exist
yet on an older local toolchain.

Also records why the `checks` job's closing `git diff --exit-code` is
deliberately not mirrored: CI runs it on a clean checkout, whereas
locally it cannot tell your own uncommitted edits from a file a gate
rewrote, so it would always fail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Maxanox
Maxanox merged commit 29d0206 into main Sep 19, 2026
18 checks passed
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.