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

The crate in crates.io should update its cargo.lock #50

Closed
xmh0511 opened this issue Jul 23, 2024 · 3 comments
Closed

The crate in crates.io should update its cargo.lock #50

xmh0511 opened this issue Jul 23, 2024 · 3 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Jul 23, 2024

https://docs.rs/crate/ipstack/0.0.10/source/Cargo.lock

[[package]]
name = "etherparse"
version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "095ab548cf452be5813424558a18af88f0a620d0f4a3d8793aa09311a3b6fa5f"
dependencies = [
"arrayvec",
]

The crate on crates.io is locked its dependency etherparse's version to be 0.14.3, which is not compatible with 0.15 written in https://github.com/narrowlink/ipstack/blob/main/Cargo.toml#L21

@SajjadPourali
Copy link
Collaborator

SajjadPourali commented Jul 23, 2024

I don’t see the issues, could you please elaborate the issue?

@xmh0511
Copy link
Contributor Author

xmh0511 commented Jul 24, 2024

I don’t see the issues, could you please elaborate the issue?

with this dependencies

[dependencies]
tokio = { version = "1.37", features = [
    "sync",
    "rt",
    "time",
    "io-util",
    "macros",
	"rt-multi-thread",
] }

tun2 = { version = "2", features = ["async"] }
ipstack = "0.0.10"
etherparse = { version = "0.15", default-features = false, features = ["std"] }
socket2 = "0.5.7"

will get an error

error[E0308]: mismatched types
  --> src/main.rs:39:65
   |
39 | ..._ipv4() && u.ip_protocol() == etherparse::IpNumber(1) {
   |               ---------------    ^^^^^^^^^^^^^^^^^^^^^^^ expected `IpNumber`, found a different `IpNumber`
   |               |
   |               expected because this is `etherparse::net::ip_number_impl::IpNumber`
   |
   = note: `IpNumber` and `IpNumber` have similar names, but are actually distinct types

`IpNumber` is defined in crate `etherparse`
etherparse-0.15.0/src/net/ip_number_impl.rs:47:1

`IpNumber` is defined in crate `etherparse`
etherparse-0.14.3/src/net/ip_number_impl.rs:47:1

47 | pub struct IpNumber(pub u8);
   | ^^^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `etherparse` are being used?

This is a minimal reproduction project
use.zip

@SajjadPourali
Copy link
Collaborator

The issue involves exposing the IP number through the API.

Thanks for the report

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

No branches or pull requests

2 participants