wgsl_to_wgpu icon indicating copy to clipboard operation
wgsl_to_wgpu copied to clipboard

limit breaking changes when adding new write options

Open ScanMountGoat opened this issue 1 year ago • 2 comments

ScanMountGoat avatar Aug 12 '24 23:08 ScanMountGoat

Does simply adding #[non_exhaustive] to the write options solve this issue? It would be a breaking change right now, but would reduce the number of breaking changes in the future.

stefnotch avatar Nov 11 '24 14:11 stefnotch

That would limit breaking changes. I've waited on implementing this since the examples are almost exclusively using the ..Default::default() syntax that won't work with #[non_exhaustive]. In practice, adding options won't break any code if people aren't initializing every field. I'm not against changing this to something else like the builder pattern in the future if there are a lot of additional configuration options.

ScanMountGoat avatar Nov 11 '24 15:11 ScanMountGoat