Skip to content

Conversation

jorgeantonio21
Copy link
Contributor

No description provided.

@brayniac
Copy link
Contributor

Thanks for opening this. It looks like there are some build failures to address.

@brayniac
Copy link
Contributor

brayniac commented Mar 18, 2025

Could I get you to address the clippy warning that was introduced with this?

@jorgeantonio21
Copy link
Contributor Author

@brayniac not sure if I follow. Running cargo check --all-features looks good to me. The clippy warnings I see refer to code that has been merged before and is unrelated to this PR. Maybe something is escaping me ?

@brayniac
Copy link
Contributor

Thanks! This looks good.

@brayniac brayniac merged commit 5fb0519 into rust-nvml:main Mar 22, 2025
7 checks passed
brayniac added a commit that referenced this pull request Mar 24, 2025
brayniac added a commit that referenced this pull request Mar 24, 2025
@brayniac
Copy link
Contributor

I'm not sure what happened with this where there were build failures after merging this. But I reverted the change set.

Here's the build failure from the github action:

Updating crates.io index
 Downloading crates ...
  Downloaded darling v0.20.5
  Downloaded ident_case v1.0.1
  Downloaded bitflags v2.4.2
  Downloaded darling_macro v0.20.5
  Downloaded cfg-if v1.0.0
  Downloaded wrapcenum-derive v0.4.1
  Downloaded strsim v0.10.0
  Downloaded static_assertions v1.1.0
  Downloaded unicode-ident v1.0.12
  Downloaded thiserror-impl v1.0.56
  Downloaded serde v1.0.196
  Downloaded darling_core v0.20.5
  Downloaded serde_derive v1.0.196
  Downloaded proc-macro2 v1.0.7[8](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:9)
  Downloaded libloading v0.8.1
  Downloaded thiserror v1.0.56
  Downloaded quote v1.0.35
  Downloaded fnv v1.0.7
  Downloaded syn v2.0.48
   Compiling proc-macro2 v1.0.78
   Compiling unicode-ident v1.0.12
   Compiling fnv v1.0.7
   Compiling ident_case v1.0.1
   Compiling strsim v0.10.0
   Compiling serde v1.0.1[9](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:10)6
    Checking cfg-if v1.0.0
   Compiling thiserror v1.0.56
    Checking libloading v0.8.1
    Checking nvml-wrapper-sys v0.8.0 (/home/runner/work/nvml-wrapper/nvml-wrapper/nvml-wrapper-sys)
    Checking static_assertions v1.1.0
   Compiling quote v1.0.35
   Compiling syn v2.0.48
    Checking bitflags v2.4.2
   Compiling darling_core v0.20.5
   Compiling thiserror-impl v1.0.56
   Compiling serde_derive v1.0.196
   Compiling darling_macro v0.20.5
   Compiling darling v0.20.5
   Compiling wrapcenum-derive v0.4.1
    Checking nvml-wrapper v0.[10](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:11).0 (/home/runner/work/nvml-wrapper/nvml-wrapper/nvml-wrapper)
error[E0428]: the name `ConfidentialComputeGpuAttestationReport` is defined multiple times
Error:    --> nvml-wrapper/src/structs/device.rs:174:1
    |
10  | pub struct ConfidentialComputeGpuAttestationReport {
    | -------------------------------------------------- previous definition of the type `ConfidentialComputeGpuAttestationReport` here
...
174 | pub struct ConfidentialComputeGpuAttestationReport {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ConfidentialComputeGpuAttestationReport` redefined here
    |
    = note: `ConfidentialComputeGpuAttestationReport` must be defined only once in the type namespace of this module

error[E0[11](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:12)9]: conflicting implementations of trait `Debug` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:172:10
    |
8   | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |          ----- first implementation here
...
[17](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:18)2 | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |          ^^^^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E01[19](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:20)]: conflicting implementations of trait `Clone` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:172:17
    |
8   | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                 ----- first implementation here
...
172 | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                 ^^^^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `std::cmp::Eq` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:172:[24](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:25)
    |
8   | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                        -- first implementation here
...
172 | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                        ^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `StructuralPartialEq` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:172:[28](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:29)
    |
8   | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                            --------- first implementation here
...
172 | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                            ^^^^^^^^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `PartialEq` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:172:28
    |
8   | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                            --------- first implementation here
...
172 | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                            ^^^^^^^^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Serialize` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:173:[38](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:39)
    |
9   | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    |                                      --------- first implementation here
...
173 | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    |                                      ^^^^^^^^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Deserialize<'_>` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:173:49
    |
9   | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    |                                                 ----------- first implementation here
...
173 | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    |                                                 ^^^^^^^^^^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `Hash` for type `structs::device::ConfidentialComputeGpuAttestationReport`
Error:    --> nvml-wrapper/src/structs/device.rs:172:[39](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:40)
    |
8   | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                                       ---- first implementation here
...
172 | #[derive(Debug, Clone, Eq, PartialEq, Hash)]
    |                                       ^^^^ conflicting implementation for `structs::device::ConfidentialComputeGpuAttestationReport`
    |
    = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0592]: duplicate definitions with name `confidential_compute_gpu_attestation_report`
Error:    --> nvml-wrapper/src/device.rs:973:5
    |
766 | /     pub fn confidential_compute_gpu_attestation_report(
767 | |         &self,
768 | |         nonce: [u8; NVML_CC_GPU_CEC_NONCE_SIZE as usize],
769 | |     ) -> Result<ConfidentialComputeGpuAttestationReport, NvmlError> {
    | |___________________________________________________________________- other definition for `confidential_compute_gpu_attestation_report`
...
973 | /     pub fn confidential_compute_gpu_attestation_report(
974 | |         &self,
975 | |         nonce: [u8; NVML_CC_GPU_CEC_NONCE_SIZE as usize],
976 | |     ) -> Result<ConfidentialComputeGpuAttestationReport, NvmlError> {
    | |___________________________________________________________________^ duplicate definitions for `confidential_compute_gpu_attestation_report`

Some errors have detailed explanations: E0119, E0[42](https://github.com/rust-nvml/nvml-wrapper/actions/runs/14011296921/job/39231421058#step:4:43)8, E0592.
For more information about an error, try `rustc --explain E0119`.
error: could not compile `nvml-wrapper` (lib) due to 10 previous errors
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101

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.

2 participants