Repository navigation
Update error! macros to allow spanned hints as: hint[span]: "..." - #8052
Merged
Merged
Conversation
laurmaedje
reviewed
Apr 1, 2026
Member
|
Thanks! |
vlad2305m
added a commit
to vlad2305m/typst
that referenced
this pull request
Apr 3, 2026
# * 65a9626 2026-04-03 17:26 vlad2305m Merge branch 'typst:main' into main HEAD, origin/main, origin/HEAD # |\ # | * d6848a8 2026-04-02 17:27 Laurenz Lowercase error message (typst#8059) # | * 6ecf521 2026-04-02 07:48 Ian Update `error!` macros to allow spanned hints as: `hint[span]: "..."` (typst#8052) # | * b772964 2026-03-24 16:51 Ian Wrzesinski Escape emitted (not annotated) newlines in test error messages
jassielof
pushed a commit
to jassielof/typst
that referenced
this pull request
Apr 7, 2026
ParaN3xus
added a commit
to ParaN3xus/tinymist
that referenced
this pull request
May 15, 2026
ParaN3xus
added a commit
to ParaN3xus/typst.ts
that referenced
this pull request
May 15, 2026
ParaN3xus
added a commit
to ParaN3xus/typst.ts
that referenced
this pull request
May 15, 2026
ParaN3xus
added a commit
to ParaN3xus/tinymist
that referenced
this pull request
May 24, 2026
ParaN3xus
added a commit
to ParaN3xus/tinymist
that referenced
this pull request
Jun 1, 2026
Myriad-Dreamin
pushed a commit
to Myriad-Dreamin/tinymist
that referenced
this pull request
Jun 13, 2026
Myriad-Dreamin
pushed a commit
to Myriad-Dreamin/tinymist
that referenced
this pull request
Jun 13, 2026
Myriad-Dreamin
pushed a commit
to Myriad-Dreamin/tinymist
that referenced
this pull request
Jun 13, 2026
Myriad-Dreamin
added a commit
to Myriad-Dreamin/tinymist
that referenced
this pull request
Jun 15, 2026
Part of the Typst 0.15 cleanup stack. This slice covers diagnostics/span migration and the minimal query prerequisites needed before the later export and text accessor slices. ## Upstream Typst Changes - [`typst/typst#8052`](typst/typst#8052) makes diagnostic hints carry span metadata. Tinymist renders the hint message payload instead of formatting the whole spanned wrapper. - [`typst/typst#8254`](typst/typst#8254) changes diagnostic, user-action, and test-range span handling. Tinymist updates LSP diagnostics, user-action conversion, and range-sensitive tests for the new span shape. - [`typst/typst#8188`](typst/typst#8188) changes syntax diagnostics. Tinymist updates syntax matchers and diagnostics conversion paths that inspect syntax-side errors. - [`typst/typst#8307`](typst/typst#8307) changes bibliography lookup. Tinymist now finds bibliography elements through the document introspector and packs them back to `BibliographyElem`. - Typst 0.15 deprecates rooted virtual-path access through `as_rooted_path`; diagnostics now use the slash-form virtual path accessor for extension checks. ## Tinymist Changes - Updates `tinymist-world` diagnostic rendering for spanned hint values. - Updates `tinymist-query`, `tinymist-analysis`, `tinymist-lint`, and debug-facing syntax diagnostics for the new span and syntax diagnostic APIs. - Updates user-action span conversion and affected test ranges. - Updates code-context path evaluation to construct `RangeMapper` from an iterator, matching the lint expectations of the current toolchain. - Carries the small bibliography lookup prerequisite in this slice so later query-oriented slices build on the updated Typst API. --------- Co-authored-by: paran3xus <[email protected]>
Myriad-Dreamin
pushed a commit
to Myriad-Dreamin/typst.ts
that referenced
this pull request
Jun 15, 2026
Myriad-Dreamin
pushed a commit
to Myriad-Dreamin/typst.ts
that referenced
this pull request
Jun 15, 2026
Myriad-Dreamin
added a commit
to Myriad-Dreamin/tinymist
that referenced
this pull request
Jun 15, 2026
Part of the Typst 0.15 cleanup stack. This slice covers diagnostics/span migration and the minimal query prerequisites needed before the later export and text accessor slices. ## Upstream Typst Changes - [`typst/typst#8052`](typst/typst#8052) makes diagnostic hints carry span metadata. Tinymist renders the hint message payload instead of formatting the whole spanned wrapper. - [`typst/typst#8254`](typst/typst#8254) changes diagnostic, user-action, and test-range span handling. Tinymist updates LSP diagnostics, user-action conversion, and range-sensitive tests for the new span shape. - [`typst/typst#8188`](typst/typst#8188) changes syntax diagnostics. Tinymist updates syntax matchers and diagnostics conversion paths that inspect syntax-side errors. - [`typst/typst#8307`](typst/typst#8307) changes bibliography lookup. Tinymist now finds bibliography elements through the document introspector and packs them back to `BibliographyElem`. - Typst 0.15 deprecates rooted virtual-path access through `as_rooted_path`; diagnostics now use the slash-form virtual path accessor for extension checks. ## Tinymist Changes - Updates `tinymist-world` diagnostic rendering for spanned hint values. - Updates `tinymist-query`, `tinymist-analysis`, `tinymist-lint`, and debug-facing syntax diagnostics for the new span and syntax diagnostic APIs. - Updates user-action span conversion and affected test ranges. - Updates code-context path evaluation to construct `RangeMapper` from an iterator, matching the lint expectations of the current toolchain. - Carries the small bibliography lookup prerequisite in this slice so later query-oriented slices build on the updated Typst API. --------- Co-authored-by: paran3xus <[email protected]>
Myriad-Dreamin
added a commit
to Myriad-Dreamin/tinymist
that referenced
this pull request
Jun 15, 2026
Part of the Typst 0.15 cleanup stack. This slice covers diagnostics/span migration and the minimal query prerequisites needed before the later export and text accessor slices. ## Upstream Typst Changes - [`typst/typst#8052`](typst/typst#8052) makes diagnostic hints carry span metadata. Tinymist renders the hint message payload instead of formatting the whole spanned wrapper. - [`typst/typst#8254`](typst/typst#8254) changes diagnostic, user-action, and test-range span handling. Tinymist updates LSP diagnostics, user-action conversion, and range-sensitive tests for the new span shape. - [`typst/typst#8188`](typst/typst#8188) changes syntax diagnostics. Tinymist updates syntax matchers and diagnostics conversion paths that inspect syntax-side errors. - [`typst/typst#8307`](typst/typst#8307) changes bibliography lookup. Tinymist now finds bibliography elements through the document introspector and packs them back to `BibliographyElem`. - Typst 0.15 deprecates rooted virtual-path access through `as_rooted_path`; diagnostics now use the slash-form virtual path accessor for extension checks. ## Tinymist Changes - Updates `tinymist-world` diagnostic rendering for spanned hint values. - Updates `tinymist-query`, `tinymist-analysis`, `tinymist-lint`, and debug-facing syntax diagnostics for the new span and syntax diagnostic APIs. - Updates user-action span conversion and affected test ranges. - Updates code-context path evaluation to construct `RangeMapper` from an iterator, matching the lint expectations of the current toolchain. - Carries the small bibliography lookup prerequisite in this slice so later query-oriented slices build on the updated Typst API. --------- Co-authored-by: paran3xus <[email protected]>
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.
This adds syntax to the
error!,bail!, andwarning!macros for spanned hints.I had to reconfigure the macro internals a bit to allow for a recursive macro call --- moving from
.with_hint()taking the diagnostic by value to mutating the diagnostic --- but the result should be the same.I also updated the three cases of manual calls that were able to use the spanned hint macro plus a single warning that didn't need the new syntax, but could still use the
warning!macro.