Replies: 1 comment
-
Definitely agreed 👍
Yeah, lets leave it be.
Definitely, along with giving users better errors. We need to transition to our own parser going forward.
Let's do that ❤️. We can track that based on whether or not we generate any |
Beta Was this translation helpful? Give feedback.
-
Running our
tgpu-cli gen
tool on the entirewegpu-samples
repository, brought to my attention some aspects I would like to discuss.--overwrite/--keep
flag, only one error is printed listing one file that already exists, even though there might be more. I think it would be better in this case (with no option specified) to first check all output files whether they exist or not and if any do, then print out the error, list all already existing and exit the program.wgsl_reflect
fails on the file with this line:@group(0) @binding(1) var output : texture_storage_2d<{OUTPUT_FORMAT}, write>;
. It is not valid wgsl, so I don't think we can do anything about it.wgsl_reflect
also fails on a file with this line:if (dpdx(xy.x) < kGridEdgeHalfWidth * 2) & (dpdy(xy.y) < kGridEdgeHalfWidth * 2) {
it works fine when we add parentheses around the condition, though I believe that should not be required. That's one more reason to continue developing our own parser imo, though I think this isn't a common case.tgpu
and/ord
(typegpu/data), thus unused import errors occur. I'm afraid that's a common setting to treat unused imports as errors, and so our tool generates invalid code. On the other hand, projects usually have their own linting rules, that we cannot universally support, so reformatting generated files shall happen anyways, therefore this step might include removing unused imports too. Or we could just not add these imports, when they're not necessary.A few issues that are already fixed in #466:
Resources
instead of plain identifiers. #357*.ts
or similar (with no directory), the script shouldn't throw an error about no "**/*" in output pattern when duplicate file names are found, as in that case, the directory hierarchy is indeed kept.Beta Was this translation helpful? Give feedback.
All reactions