slang: Add an opt-in fail-on-error gate - #41
Open
DanielKellerM wants to merge 1 commit into
Open
Conversation
The action exits 0 regardless of compile errors so reviewdog can annotate them, and the reviewdog step is continue-on-error, so the action cannot fail a job. That makes it an annotator, and a project wanting slang as an elaboration gate has to reimplement the driver call instead of using it. fail-on-error keeps the default behaviour and adds a step, after reviewdog so diagnostics are still annotated, that fails when the diagnostics contain an error. It reads the diagnostics rather than reviewdog's exit status: reviewdog needs a check-write token, which a pull request from a fork does not get, so a gate built on it would pass silently exactly where a public gate matters most.
This was referenced Aug 13, 2026
Open
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.
The action cannot fail a job today:
run_slang.pyexits 0 regardless of compile errors so reviewdog can annotate them, and the reviewdog step iscontinue-on-error: true. That makes it an annotator rather than a gate, so a project that wants slang as its elaboration gate has to reimplement the driver call. We hit exactly that in iDMA and ended up with a local copy of the same pinned pyslang driver.fail-on-error(defaultfalse) keeps current behaviour for every existing consumer and adds a step that fails when the diagnostics contain an error.Two deliberate choices:
slang_diags.jsonrather than reviewdog's exit status. reviewdog needs a token with check-write permission, which a pull request from a fork does not get; a gate built on its exit code would pass silently on fork PRs, which is where a public gate is worth the most.A missing diagnostics file is also a failure, so a slang invocation that never ran cannot read as success.
Tested locally: errors exit 1 and are listed, warnings-only exits 0, missing file exits 1.