Skip to content
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

build fail: unresolved import rand::distributions #1375

Open
Shonke opened this issue Feb 20, 2025 · 1 comment
Open

build fail: unresolved import rand::distributions #1375

Shonke opened this issue Feb 20, 2025 · 1 comment
Labels
defect Suspected defect such as a bug or regression

Comments

@Shonke
Copy link

Shonke commented Feb 20, 2025

Observed behavior

$ cargo new demo2 && cd demo2
$ cargo add nats
$ cat Cargo.toml
[package]
name = "demo2"
version = "0.1.0"
edition = "2021"

[dependencies]
nats = "0.25.0"
$ cargo r
   ....
   Compiling rand v0.9.0
   Compiling rand v0.8.5
   Compiling tinystr v0.7.6
   Compiling icu_collections v1.5.0
   Compiling nuid v0.3.2
error[E0432]: unresolved import `rand::distributions`
  --> /Users/xiao/.cargo/registry/src/mirrors.aliyun.com-8754fae0eb2f08f1/nuid-0.3.2/src/lib.rs:19:11
   |
19 | use rand::distributions::Alphanumeric;
   |           ^^^^^^^^^^^^^ could not find `distributions` in `rand`
$ cargo tree|grep -A3 nuid
│   ├── nuid v0.3.2
│   │   ├── lazy_static v1.5.0
│   │   └── rand v0.9.0
│   │       ├── rand_chacha v0.9.0

https://crates.io/crates/nats/0.25.0/dependencies
Image

Expected behavior

Normal compilation

Server and client version

normal

Host environment

No response

Steps to reproduce

No response

@Shonke Shonke added the defect Suspected defect such as a bug or regression label Feb 20, 2025
@Jarema
Copy link
Member

Jarema commented Feb 20, 2025

This relates to this: casualjim/rs-nuid#12

Can you please check if its working fine on main for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants