Rust-GPU / Rust-GPU/rust-gpu

[Migrated] Minor Bug: Misleading error message when compile succeeds but no *.spv was found

Offen
#102 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Rust
Sterne
3.4k
Forks
126
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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\".

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Öffne crates/spirv-builder/src/lib.rs und untersuche Zeile 538 am Ende von invoke_rustc(). Bestätige, wie der Fall ohne Artefakt erreicht wird, nachdem die Kompilierung erfolgreich war. Als erledigt gilt, dass die Fehlermeldung präzise erklärt, dass kein .spv-Artefakt erstellt wurde, und auf die erforderliche crate-type-Einstellung verweist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
compilers
Issue-Typ
Bug
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.