[Migrated] Minor Bug: Misleading error message when compile succeeds but no *.spv was found
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/955
Old labels: t: enhancement
Originally creatd by Firestar99 on 2022-11-30T14:32:49Z
If you compile a crate with rust-gpu but forget to add
[lib]
crate-type = ["lib", "dylib"]
in it's cargo.toml rust-gpu will error out with: Artifact created when compilation succeeded.
This Error is outright wrong: What actually happened is that compilation succeeded but NO *.spv artifact was found.
The error is thrown in crates/spirv-builder/src/lib.rs line 538, at the end of the invoke_rustc() method.
I'd like to suggest replacing this message with Compilation succeeded but no .spv Artifact was created! Make sure the crate-type includes \"dylib\".
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
Open crates/spirv-builder/src/lib.rs and inspect line 538 at the end of invoke_rustc(). Confirm how the no-artifact case is reached after compilation succeeds. Done means the error message accurately explains that no .spv artifact was created and points to the required crate-type setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100