Skip to content

feat(dispatch): Validate the dispatch-surface declaration at configure time - #373

Merged
ahuber21 merged 0 commit into
dispatch/02-generate-surfacefrom
dispatch/03-validate-surface
Sep 2, 2026
Merged

ahuber21 merged 0 commit into
dispatch/02-generate-surfacefrom
dispatch/03-validate-surface

Conversation

@ahuber21

@ahuber21 ahuber21 commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

cmake/validate-dispatch-surface.cmake rejects a malformed declaration at
configure time -- duplicate, zero or non-numeric extents, svs::Dynamic listed
explicitly, a malformed level spec, a level with no translation unit. It touches
no build-system state, so it also runs under cmake -P: fourteen fixtures in
tests/cmake/dispatch-surface/ each state the error they expect, and
.github/scripts/check_dispatch_surface.sh drives the validator over all of them
plus the default declaration. That script is a pre-commit hook and a CI job, and
needs no compiler and no build tree.

The new Dispatch Surface workflow adds the two things the script cannot check:
that a default configure leaves the committed dispatch_surface.h
byte-identical, and that a full build against valid-reduced.cmake -- which
shares no fixed extent with the default nine -- compiles and tests. A build
that quietly fell back to the committed header would fail to compile there
rather than pass by accident.

Gotcha: script mode gets no cmake_minimum_required, so the validator sets
CMP0007 and CMP0057 itself. Without them an empty |-field vanishes when the
entry is split, and IN_LIST is not an operator.

Part 3 of 4 of the ISA dispatching v2 milestone.

@ahuber21 ahuber21 added this to the ISA dispatching v2 milestone Aug 24, 2026
@ahuber21 ahuber21 changed the title Check the dispatch-surface declaration, and keep it configurable feat(dispatch): Validate the dispatch-surface declaration at configure time Aug 24, 2026
@ahuber21
ahuber21 force-pushed the dispatch/03-validate-surface branch 2 times, most recently from 7200927 to 0a0a6e7 Compare August 24, 2026 09:44
@ahuber21
ahuber21 force-pushed the dispatch/03-validate-surface branch 2 times, most recently from 135d3cc to 36014f0 Compare August 25, 2026 12:31
@ahuber21
ahuber21 marked this pull request as ready for review August 25, 2026 12:38
@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@ahuber21
ahuber21 force-pushed the dispatch/03-validate-surface branch from 36014f0 to a715124 Compare August 25, 2026 15:23
@ahuber21
ahuber21 merged commit a715124 into main Sep 2, 2026
25 checks passed
@ahuber21
ahuber21 deleted the dispatch/03-validate-surface branch September 2, 2026 12:32
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.

1 participant