Update WeslToml.md with more precise algorithm for include/exclude#172
Update WeslToml.md with more precise algorithm for include/exclude#172stefnotch wants to merge 1 commit into
Conversation
|
This doesn't cover the "implicit wesl.toml" case yet. As in, whenever we see a package.json, we should pretend that there's a wesl.toml next to it. |
|
Good question on the nested case. If it's not clear what to do, could defer if it's not needed by any current projects. another future case to think about. with include/exclude alone, exclude takes priority. if we decide to respect gitignore, is the priority: include < gitignore < exclude? re: nonsensical mixes of root and include, should we warn? |
|
Bevy is going to need the nested case. They'll want a root level wesl.toml (bevy), which then references the wesl.tomls of all the sub-projects (bevy_pbr, bevy_...) Good question. I'm not yet sure if we want to look at the gitignore at all, since there's the case where I do code generation. Generated wesl code is a prime candidate for Yeah, warning would be very polite. Even straight up throwing an error might be reasonable. |
|
if not gitignore, then probably |
|
re: nonsensical |
|
We need a I'd be very happy about an alternative that requires less configuration though. |
It makes sense that bevy may want to divide their shaders into subsets, but do you have some more detail on what this might look like? I'm looking over at bevy-wgsl and realizing that I don't yet understand what they'd want out of multiple wesl.toml files. |
|
It doesn't make too much sense when you look at that repo. It becomes more obvious once you look at Bevy itself, and realize that every "crate" is an independently published project https://github.com/bevyengine/bevy/tree/main/crates It's possible to only use bevy_render, and supply the rest of the renderer yourself. (I think) At the same time, they want users that only depend on Bevy to only have import statements like |
|
Closing in favour of #182 |
I noticed that the include/exclude section doesn't properly specify what to do in certain edge cases.
wesl.tomlfileroot = "./shaders"combined withinclude = ["foo/bar"], then what should happen? Should I still look atfoo/bar, or should it be ignored since it's nonsense