-
Notifications
You must be signed in to change notification settings - Fork 150
Revert Changes to compile against libbpf-sys 1.1.0, update to 1.1.1 #306
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
Conversation
This reverts commit 271895a. libbpf-sys has updated to 1.1.1 and the changes to compile against 1.1.0 now cause breaks. Signed-off-by: Michael Mullin <[email protected]>
Thanks (again) for the pull request. The revert should definitely go in, but I am not convinced that we need the bump. Version |
@danielocfb I personally encourage updating as soon as possible, as often as possible. Even if you don't need the changes. Small incremental and often applied updates are usually easier than large-only-occasionally applied updates. My personal view is that not being "up-to-date" is a tech-debt. That said, I understand other's disagree with this. Up until yesterday, our team specifically did not check Cargo.lock into versioning control, and we use the "*" versioning in Cargo.toml in order to force us to keep up-to-date as soon as changes occur. Because of the issues with libbpf-sys and with num_enum_derive this week, we've checked in a Cargo.lock, and will be adding a nightly CI check for cargo update. Just so that you don't think I'm insane, we will be locking our dependencies in Cargo.toml when we get close to release date. :) A lot of the above is coloured by my observation of the difficulties the chrono crate had by not keeping up to date with their dependency of the time crate. This difficulty in updating caused them to be listed as a security risk by cargo audit for an extended period of time, and a significant percentage of the chrono userbase moved away from that crate because of this. However, for specifically this dependencies semver, "customers" of libbpf-rs will normally be picking up the latest version of libbpf-sys upon a new project, or upon a cargo update. It might be wise to keep up-to-date specifically with libbpf-sys regardless of how you feel about my above described philosophy. |
Thanks for sharing your thoughts, @mimullin-bbry. The main point I am making is that it is very much how semver operates to have a version range available (it does not have to, but that's the power of it). Needlessly restricting this range is counter productive. What we are saying when we specify libbpf-sys = { version = "1.0.3" } in By saying that It is fine (and necessary) to depend on Note that all of this is a bit different in bin vs. lib settings. A library has downstream consumers that should be given the most flexibility possible. For a binary it really does not matter what version is specified, because nobody is consuming it.
Yes, no disagreement on the updating part, but I think we are conflating mechanisms and their intended purposes here, no? I am happy to bump the version we use in CI in
Yeah, they can pick any allowed version, but I don't think we should be artificially restricting for them what is allowed. So here is my suggestion that I think addresses your up-to-date-ness concerns: let's drop the version bump in |
Update the libbpf-sys library to version 1.1.1 in Cargo.lock Signed-off-by: Michael Mullin <[email protected]>
Ah, I understand. When I library sets a dependency in Cargo.toml it's explicitly saying "this library requires this minimum version", which puts a restriction upon users of the library if they need to use an older version. Thanks for broadening my understanding of the ecosystem :) Change updated. Tangential question (related to the num_enum issues). Is there a way for a new project using libbpf-rs to explicitly state they want libbpf-sys 1.0.3? I was pulling out my hair yesterday trying to figure out how I could get my project, which uses libbpf-rs, which uses num_enum which uses num_enum_derive to pin to an exact version of num_enum and num_enum_derive. |
Awesome, thank you!
I believe there are two ways to go about that, with different trade-offs. First, they can just pin that version in The other option is to pin a specific version (or range) in |
Changes which fixed libbpf-sys compile breakage for 1.1.0 now cause breaks against 1.1.1.
These two commits fix those issues.