typst / typst/package-check

Error not annotated on github due to invalid span

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
36
Forks
9
Avg merge
1h 46m
Merged PRs (30d)
1

Description

When the conversion to a github annotation fails, the error is still mentioned in the summary, but not visible as an annoation.
I guess the conversion could be more lenient, and fall back to reporting on the manifest if the span is invalid.

See: https://github.com/typst/packages/pull/4596/checks?check_run_id=72651830265

We should probably also log the diagnostic, like we do when run in the CLI:

2026-04-23T16:19:21.140300Z ERROR typst_package_check::cli: failed to print diagnostics (failed to load file (is a directory))
2026-04-23T16:19:21.140330Z ERROR typst_package_check::cli: Raw diagnostics: [
    Diagnostic {
        severity: Error,
        code: Some(
            "exclude/template",
        ),
        message: "This file is part of the template and should not be excluded.",
        labels: [
            Label {
                style: Primary,
                file_id: /examples,
                range: 0..0,
                message: "",
            },
        ],
        notes: [],
    },
]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GitHub annotation conversion and the CLI diagnostic-reporting path, using the linked check run and the shown raw diagnostic as references. Trace how an invalid span is handled and how the manifest is reported; done means the summary error remains visible, a manifest-level annotation is produced, and the diagnostic is logged.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, rust
Domain
ci-cd, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.