-
Notifications
You must be signed in to change notification settings - Fork 20
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
Upgrade all dependencies mentioned by dependabot #230
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patowen
changed the title
Upgrade more dependencies
Upgrade most dependencies mentioned by dependabot
Aug 13, 2022
Ralith
reviewed
Aug 13, 2022
patowen
force-pushed
the
upgrade-more-dependencies
branch
from
August 13, 2022 17:23
7b45d7e
to
92dbc23
Compare
patowen
changed the title
Upgrade most dependencies mentioned by dependabot
Upgrade all dependencies mentioned by dependabot
Aug 15, 2022
patowen
force-pushed
the
upgrade-more-dependencies
branch
from
October 9, 2022 20:36
57e9999
to
8d93cbc
Compare
nalgebra's proc macros are unhygenic and hardcode the package name as nalgebra when looking up functions, so using the matrix! and vector! macros require the ability to reference nalgebra with its full name.
patowen
force-pushed
the
upgrade-more-dependencies
branch
from
October 9, 2022 20:40
8d93cbc
to
021e9cd
Compare
Now that nalgebra has been updated, this is finally ready to review and merge. |
Thanks for merging! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR upgrades the following crates (comments in parentheses):
One semi-unrelated change is adding
debug-assertions = true
in the top-level Cargo.toml. Debug assertions are only enabled by default in non-optimized builds, so for them to ever be triggered, they need to be enabled manually. I discovered this while debugging the nalgebra upgrade.The below sections summarize the code changes for each crate.
Although a lot of crates were upgraded, I don't believe the diff is too complicated to review. However, the individual commits are relatively clean, so looking at these may help simplify the code review. I did create the PR under the assumption that the commits would be squashed, though.
metrics
This is the most complicated change, as the API was significantly adjusted in the metrics crate. The
timing!
macro was removed and replaced with ahistogram!
macro. Thehistogram!
macro both "registers" a histogram and records to it. I found the documentation of the crate a bit lacking, but my understanding is that registration is meant to be idempotent.I made registration practically a no-op, just returning an object that had enough information to implement "recording" the same way as it was implemented before. Fortunately, the PR diff highlights this well.
One other major change is that the metrics crate uses
f64
instead ofu64
now, and the conversion of anInterval
to anf64
using this crate uses a unit of seconds, so I had the calls tohistogram!
use seconds, while I had thehdrhistogram
use nanoseconds as before.Fortunately, besides switching
metrics_core::Key
tometrics::Key
, I didn't need to change theRecorder
struct itself.Another minor note: the
std
feature option was removed in version 0.18.0.ash-window
The required parameters for
ash_window::enumerate_required_extensions
andash_window::create_surface
have changed to useRawDisplayHandle
andRawWindowHandle
objects directly instead of relying on traits. This required adding an additional dependency:raw_window_handle
. Implementing this change just involved following the example provided in the ash_window git repo.hecs
The main change in the hecs crate was the replacement of
get::<T>
andget_mut::<T>
withget::<&T>
andget::<&mut T>
respectively. I believe this change was introduced in 0.8.0.nalgebra
The most repetitive code modification was changing
na::RealField
tona::RealField + Copy
, as theCopy
trait was removed fromna::RealField
, and we depended on that in a lot of places. I systematically made this change in all usages. This was a breaking change in 0.29.0.Another code change was replacing some occurrences of
na::U3
with3
, which is due to version 0.26.0 introducing the usage of const generics.The final code change was that
nalgebra
is now imported inCargo.toml
as itself instead ofna
to make its procedural macros introduced in 0.27.0 usable. Anextern crate
declaration was added to continue allowing the use ofna
. Actually using these macros is out of scope for this PR.Unfortunately, 0.26.0 also came with a performance regression in nalgebra that makes Hypermine laggy with a 5x CPU slowdown on my computer. The fix is in dimforge/nalgebra#1140, which is now present in 0.31.2.
winit
set_cursor_grab
takes an enum insteasd of a boolean, but the change is relatively straightforward. The code for grabbing the cursor came straight from the method documentation.ash-window
was not compatible with winit 0.27.1, but patch 0.27.2 added in backwards compatibility, making the upgrade possible.tracing-subscriber
The "chrono" feature option was made unavailable, and based on tokio-rs/tracing#1646, I believe it was replaced with "time". The justification was that the maintenance status of "chrono" was uncertain, causing support for it to be dropped.
All other crates
For all other crates, only
cargo.toml
was modified, making the upgrade easy. Due to interdependence between crates, I believe some had to be updated at the same time (like nalgebra and rand), but the upgrade process itself was trivial.