Skip to content

Keep previous shader outputs when a compile fails - #620

Merged
stanoddly merged 3 commits into
mainfrom
issue-619
Oct 5, 2026
Merged

stanoddly merged 3 commits into
mainfrom
issue-619

Conversation

@botoddly

@botoddly botoddly commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #619.

  • Every target compiles into the temporary directory CompileShader already creates, including the Metal and WGSL rewrites. A failed target leaves .generated untouched.
  • After every target succeeds, the old metadata is deleted, the outputs are copied into .generated, and the metadata is written last. A build interrupted while copying finds no metadata and compiles again.

Verification

  • A new test builds a shader, breaks it so the SPIR-V output is written and then rejected by the draw parameters check, restores the source and builds again. Every file in .generated matches the original build. The test fails without the fix.
  • Pixely.SdlangCompiler.Tests (65) pass. The build integration tests pass on Linux; the Windows-only one did not run.
  • The test breaks the shader through the draw parameters check rather than a DXC rejection, which exercises the same path.

@stanoddly
stanoddly enabled auto-merge (squash) October 5, 2026 12:58
@stanoddly
stanoddly merged commit d61ede2 into main Oct 5, 2026
2 checks passed
@stanoddly
stanoddly deleted the issue-619 branch October 5, 2026 13:04
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

📦 Development package Pixely 0.0.111 is available.

Workflow run (attempt 1)

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

✅ Development package validation passed on all platforms.

Workflow run (attempt 1)

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.

A failed shader compile can leave its outputs cached under the previous metadata

2 participants