-
Notifications
You must be signed in to change notification settings - Fork 85
Forward rustc warnings #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
3ee0a55 to
195417a
Compare
| if self.print_metadata == MetadataPrintout::Full { | ||
| println!("cargo:rustc-env={}={}", env_var, spirv_module.display()); | ||
| if self.build_script.env_shader_spv_path() { | ||
| println!( | ||
| "cargo::rustc-env=SHADER_SPV_PATH={}", | ||
| spirv_module.display() | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I'm already changing this part, I've considered adding some more ways to "send" the shader binaries from the build script into the source code, like multimodule support for env vars or better source code gen. But I feel like exploring that would be better in a followup PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the code is outdated, I decided to go back on renaming the env var to SHADER_SPV_PATH since it breaks the android build
195417a to
b8e45e4
Compare
b8e45e4 to
f54d1c7
Compare
f54d1c7 to
8b83d58
Compare
enum MetadataPrintoutwithstruct BuildScriptConfigfor more flexibilityspirv_builder.build_script.defaultsallows us to add new options like below in the futureMetadataPrintout::DependencyOnlyis nowspirv_builder.build_script.dependency_info = Some(true)and defaults tospirv_builder.build_script.defaults(property above)MetadataPrintout::Fullis nowspirv_builder.build_script.env_shader_spv_path = Some(true)and defaults tofalse(preventing conflicts with multimodule)cargo::warning={})Example error
Image cause github doesn't support ansi in code blocks. Also note how in the shader warning, the final "

space-engine-shader(lib) generated 1 warning" is missing. This is due tocargo --quietalso suppressing those, next to the other status messages.close #346
close Rust-GPU/cargo-gpu#103