[Migrated] spirv-builder could show warnings from building shaders.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/880
Old labels: t: enhancement
Originally creatd by eddyb on 2022-07-04T06:48:36Z
Cargo build scripts have the ability to produce output through Cargo via cargo:warning=MESSAGE even when successful.
We should probably make spirv-builder transform stderr lines from its nested cargo build (of the shaders) into cargo:warning, but we may need to use the JSON output mode to be able to tell apart Cargo output from rustc output (as we presumably don't want to dump Compiling ... messages as "warnings").
We already pass --message-format=json-render-diagnostics to the nested cargo build though (to parse out "artifact notifications"), so it should be pretty easy to further rely on the JSON output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at spirv-builder's handling of the nested cargo build, which already uses --message-format=json-render-diagnostics to parse artifact notifications. Determine how Cargo warning messages are represented in that output, then ensure relevant shader-build warnings reach the outer build as cargo:warning lines without converting ordinary Cargo or rustc output into warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100