Skip to content

Conversation

nazar-pc
Copy link
Contributor

@nazar-pc nazar-pc commented Jul 25, 2025

I didn't touch most of the dependencies, only those that didn't have the latest most significant version, which results in downstream users having a lot of duplicate packages.

I removed clap constraint since I believe it was related to older toolchain used in this repo, which has been upgraded and should no longer be a problem.

Checked all changelogs available and didn't find anything problematic there.

@nazar-pc
Copy link
Contributor Author

nazar-pc commented Jul 25, 2025

Getting this, not sure what to do about it though:

error: cannot offset a pointer to an arbitrary element
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:143:1
    |
143 | / bitflags::bitflags! {
144 | |     /// Flags controlling the properties of an OpTraceRayKHR instruction.
145 | |     /// Despite being a mask and allowing multiple bits to be combined, it is
146 | |     /// invalid for more than one of these four bits to be set: `OPAQUE`,
...   |
176 | | }
    | |_^
    |
note: used from within `<spirv_std::ray_tracing::_::InternalBitFlags>::all`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:143:1
    |
143 | / bitflags::bitflags! {
144 | |     /// Flags controlling the properties of an OpTraceRayKHR instruction.
145 | |     /// Despite being a mask and allowing multiple bits to be combined, it is
146 | |     /// invalid for more than one of these four bits to be set: `OPAQUE`,
...   |
176 | | }
    | |_^
note: called by `<spirv_std::ray_tracing::_::InternalBitFlags>::from_bits_truncate`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:143:1
    |
143 | / bitflags::bitflags! {
144 | |     /// Flags controlling the properties of an OpTraceRayKHR instruction.
145 | |     /// Despite being a mask and allowing multiple bits to be combined, it is
146 | |     /// invalid for more than one of these four bits to be set: `OPAQUE`,
...   |
176 | | }
    | |_^
note: called by `<spirv_std::ray_tracing::RayFlags>::from_bits_truncate`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:143:1
    |
143 | / bitflags::bitflags! {
144 | |     /// Flags controlling the properties of an OpTraceRayKHR instruction.
145 | |     /// Despite being a mask and allowing multiple bits to be combined, it is
146 | |     /// invalid for more than one of these four bits to be set: `OPAQUE`,
...   |
176 | | }
    | |_^
note: called by `<spirv_std::ray_tracing::RayQuery>::get_ray_flags`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:425:13
    |
425 |             RayFlags::from_bits_truncate(result)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: called by `ray_query_get_ray_flags_khr::main`
   --> $DIR/ray_query_get_ray_flags_khr.rs:13:28
    |
13  |         let flags = handle.get_ray_flags();
    |                            ^^^^^^^^^^^^^^^
note: called by `main`
   --> $DIR/ray_query_get_ray_flags_khr.rs:9:8
    |
9   | pub fn main(#[spirv(descriptor_set = 0, binding = 0)] accel: &AccelerationStructure) {
    |        ^^^^

error: const_bitcast
    |
note: used from within `<spirv_std::ray_tracing::_::InternalBitFlags>::all`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:143:1
    |
143 | / bitflags::bitflags! {
144 | |     /// Flags controlling the properties of an OpTraceRayKHR instruction.
145 | |     /// Despite being a mask and allowing multiple bits to be combined, it is
146 | |     /// invalid for more than one of these four bits to be set: `OPAQUE`,
...   |
176 | | }
    | |_^
note: called by `<spirv_std::ray_tracing::_::InternalBitFlags>::from_bits_truncate`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:143:1
    |
143 | / bitflags::bitflags! {
144 | |     /// Flags controlling the properties of an OpTraceRayKHR instruction.
145 | |     /// Despite being a mask and allowing multiple bits to be combined, it is
146 | |     /// invalid for more than one of these four bits to be set: `OPAQUE`,
...   |
176 | | }
    | |_^
note: called by `<spirv_std::ray_tracing::RayFlags>::from_bits_truncate`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:143:1
    |
143 | / bitflags::bitflags! {
144 | |     /// Flags controlling the properties of an OpTraceRayKHR instruction.
145 | |     /// Despite being a mask and allowing multiple bits to be combined, it is
146 | |     /// invalid for more than one of these four bits to be set: `OPAQUE`,
...   |
176 | | }
    | |_^
note: called by `<spirv_std::ray_tracing::RayQuery>::get_ray_flags`
   --> rust-gpu/crates/spirv-std/src/ray_tracing.rs:425:13
    |
425 |             RayFlags::from_bits_truncate(result)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: called by `ray_query_get_ray_flags_khr::main`
   --> $DIR/ray_query_get_ray_flags_khr.rs:13:28
    |
13  |         let flags = handle.get_ray_flags();
    |                            ^^^^^^^^^^^^^^^
note: called by `main`
   --> $DIR/ray_query_get_ray_flags_khr.rs:9:8
    |
9   | pub fn main(#[spirv(descriptor_set = 0, binding = 0)] accel: &AccelerationStructure) {
    |        ^^^^

error: aborting due to 2 previous errors

cargo-deny seems more annoying than useful BTW.

@nazar-pc nazar-pc force-pushed the update-dependencies branch 2 times, most recently from b7ceb50 to dfcea1c Compare July 25, 2025 06:57
@nazar-pc nazar-pc force-pushed the update-dependencies branch from dfcea1c to 698caa6 Compare July 25, 2025 07:13
@Firestar99
Copy link
Member

For some reason, our backend doesn't like the following expression which bitflags 2.X expands to. I downgraded it back to 1.X for now. @eddyb any ideas?

error: cannot offset a pointer to an arbitrary element
    --> /home/firestar99/workspace/rust-gpu/crates/spirv-std/src/ray_tracing.rs:675:28
     |
675  |                 let flag = <RayFlags as bitflags::Flags>::FLAGS[i].value().bits();
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |

@nazar-pc

This comment was marked as resolved.

@Firestar99 Firestar99 force-pushed the update-dependencies branch from c0c6edd to e865f1d Compare July 25, 2025 09:54
@Firestar99
Copy link
Member

About cargo-deny: it's mostly been inherited from Embark (which also maintain cargo-deny) and we just kept on using it. I do see how it is annoying, and I wonder if we should limit it to public facing crates instead of everything. @LegNeato thoughts?

@nazar-pc
Copy link
Contributor Author

It mostly complains about things like multiple versions of Windows crate that is basically a fault of the way Microsoft packages it and there is essentially nothing that can be done about it. You just suppress it when cargo-deny complains and remove suppression when it does not. Not really actionable in any other way.

@nazar-pc
Copy link
Contributor Author

I updated deny.toml to allow duplicate packages, avoiding maintaining a growing list of exceptions for no good reason.

@LegNeato
Copy link
Collaborator

LegNeato commented Jul 25, 2025

It is actionable, in the past I have sent PRs to the deps to upgrade versions to fix the errors. It takes time though, and not sure it is super worth it.

On my phone, but curious about the build times with vs without

Copy link
Member

@Firestar99 Firestar99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to just exclude the examples from duplicate detection, so that at least our public dependencies are checked, but I can't seem to get it to work. I'd merge this as-is and reenable duplicate detection if we can figure out how to do this properly.
CI times seems to have changed sightly, but seem too variable to tell.
EmbarkStudios/cargo-deny#783

@Firestar99 Firestar99 added this pull request to the merge queue Jul 28, 2025
Merged via the queue into Rust-GPU:main with commit 3df836e Jul 28, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants