Skip to content

Error not annotated on github due to invalid span #63

Description

@saecki

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: [],
    },
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions