Skip to content

Commit ba15d4c

Browse files
committed
build_script: allow using .watch() with env_shader_spv_path
It is a nonsense combination to use, but it does technically work
1 parent 283e04b commit ba15d4c

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

crates/spirv-builder/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ pub struct BuildScriptConfig {
392392

393393
/// Whether to emit an env var pointing to the shader module file (via `cargo::rustc-env={}`). The name of the env
394394
/// var is the crate name with `.spv` appended, e.g. `sky_shader.spv`.
395-
/// Not supported together with `multimodule=true` or `.watch()`.
395+
/// Not supported together with `multimodule=true`.
396396
///
397397
/// Some examples on how to include the shader module in the source code:
398398
/// * wgpu:

crates/spirv-builder/src/watch.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ impl SpirvWatcher {
5555
.as_ref()
5656
.ok_or(SpirvBuilderError::MissingCratePath)?
5757
.clone();
58-
if builder.build_script.get_env_shader_spv_path() {
59-
return Err(SpirvWatcherError::WatchWithPrintMetadata.into());
60-
}
6158

6259
let (tx, rx) = sync_channel(1);
6360
let watcher =
@@ -170,8 +167,6 @@ impl SpirvWatcher {
170167

171168
#[derive(Debug, thiserror::Error)]
172169
pub enum SpirvWatcherError {
173-
#[error("watching within build scripts will prevent build completion")]
174-
WatchWithPrintMetadata,
175170
#[error("could not notify for changes: {0}")]
176171
NotifyFailed(#[from] notify::Error),
177172
#[error("watcher died and closed channel")]

0 commit comments

Comments
 (0)