Skip to content

Conversation

tuguzT
Copy link
Contributor

@tuguzT tuguzT commented Oct 1, 2025

It was suggested to rewrite API from scratch instead of patching the existing one.

My idea now is to expose refactored Watcher, which could just return CompileResult on recv(), then we don't need to accept any callbacks, differentiate first compile result from others, etc.

@tuguzT
Copy link
Contributor Author

tuguzT commented Oct 1, 2025

I thought CI issues were already resolved at GitHub side?
Besides, it's ready to be reviewed.

@tuguzT tuguzT marked this pull request as ready for review October 1, 2025 20:48
@Firestar99
Copy link
Member

Firestar99 commented Oct 2, 2025

CI failing is just #407, recently introduced in #400

@Firestar99 Firestar99 force-pushed the spirv-builder-watch-channel branch from e5e56df to f956b84 Compare October 2, 2025 08:45
Copy link
Member

@Firestar99 Firestar99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the new design!

Just iterated some more on it, so I'll let others do the reviewing

My changes to it:

  • we can just consume SpirvBuilder, if users need to clone it they can
  • changing a file during recompilation no longer throws errors in stdout but will trigger exactly one recompile when you call recv() again
  • wgpu example had a race condition between the first and watched compiles

@Firestar99 Firestar99 force-pushed the spirv-builder-watch-channel branch from 4a9a64c to aefe49e Compare October 2, 2025 10:02
@Firestar99
Copy link
Member

Firestar99 commented Oct 2, 2025

I added a non-blocking try_recv() function as well, required me to refactor some of the internal state machine

@Firestar99 Firestar99 force-pushed the spirv-builder-watch-channel branch from aefe49e to 13a80b7 Compare October 2, 2025 10:08
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.

2 participants