8000 specify minimum Rust version · Issue #169 · opendp/opendp · GitHub
[go: up one dir, main page]

Skip to content
specify minimum Rust version #169
@pdurbin

Description

@pdurbin

On 7550cab I was seeing errors with cargo build

$ cargo build
   Compiling opendp-ffi v0.1.0 (/Users/pdurbin/github/opendp/opendp/rust/opendp-ffi)
   Compiling opendp v0.1.0 (/Users/pdurbin/github/opendp/opendp/rust/opendp)
error[E0391]: cycle detected when computing the bounds for type parameter `MO`
  --> opendp/src/trans/count.rs:53:31
   |
53 |     where MO: CountByConstant<MO::Distance> + SensitivityMetric,
   |                               ^^^^^^^^^^^^
   |
   = note: ...which again requires computing the bounds for type parameter `MO`, completing the cycle
note: cycle used when computing explicit predicates of `trans::count::make_count_by_categories`
  --> opendp/src/trans/count.rs:53:31
   |
53 |     where MO: CountByConstant<MO::Distance> + SensitivityMetric,
   |                               ^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0391`.
error: could not compile `opendp`

To learn more, run the command again with --verbose.

@Shoeboxam helped me figure out that my version of Rust was too old. Using rustup update I upgraded from Rust 1.51.0 to 1.53.0 (which is what GitHub Actions is using) and cargo build worked fine.

There are a few solutions we could take:

  • Specify minimum version of Rust in the README or elsewhere.
  • Have a troubleshooting doc that recommends upgrading Rust if compilation fails. (I hear SmartNoise has a nice troubleshooting doc.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0