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

Update Rust and crates #5248

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Conversation

BlackDex
Copy link
Collaborator

@BlackDex BlackDex commented Nov 29, 2024

  • Updated Rust to v1.83.0
  • Updated MSRV to v1.82.0 (Needed for html5gum crate)
  • Updated icon fetching code to match new html5gum version
  • Updated workflows
  • Enabled edition 2024 clippy lints Nightly reports some clippy hints, but that would be too much to change in this PR i think.
  • Added crate patches for the fern and yubico crates to update more dependencies
  • Fixed an issue with the diesel_logger in combination with the SQLite backup feature

- Updated Rust to v1.83.0
- Updated MSRV to v1.82.0 (Needed for html5gum crate)
- Updated icon fetching code to match new html5gum version
- Updated workflows
- Enabled edition 2024 clippy lints
  Nightly reports some clippy hints, but that would be too much to change in this PR i think.

Signed-off-by: BlackDex <black.dex@gmail.com>
@BlackDex
Copy link
Collaborator Author

Looks like the Rust v1.83.0 images are not yet available

@dfunkt
Copy link
Contributor

dfunkt commented Nov 29, 2024

Perhaps we could also use commit daboross/fern@3e775cc as an override for fern in order to have syslog-7 support for syslog 7.0.0?

- Patch fern to allow syslog-7 feature
- Fixed diesel logger which was broken because of the sqlite backup feature
  Refactored the sqlite backup because of this
- Added a build workflow test to include the query_logger feature

Signed-off-by: BlackDex <black.dex@gmail.com>
@BlackDex
Copy link
Collaborator Author

@dfunkt, yea that might be a good one.
I have updated it, and fixed an issue with the query_logger (diesel-logger) feature too.

Looks like the image is still not available :(.

@BlackDex
Copy link
Collaborator Author

We could keep the docker files on v1.82.0, the correct version will be pulled anyway.

@BlackDex
Copy link
Collaborator Author

@dani-garcia, we could also patch yubikey-rs which causes several duplicate dependencies to be removed.
Mainly reqwest and all it's dependencies.

It would then be based from my forked repo where the PR is coming from.

yubico = { git = "https://github.com/BlackDex/yubico-rs", rev = "00df14811f58155c0f02e3ab10f1570ed3e115c6" }

@BlackDex BlackDex force-pushed the update-rust-and-crates branch 2 times, most recently from 30c8283 to 08c880c Compare December 4, 2024 08:32
Cargo.toml Show resolved Hide resolved
Signed-off-by: BlackDex <black.dex@gmail.com>
@BlackDex BlackDex force-pushed the update-rust-and-crates branch from 08c880c to eb17609 Compare December 5, 2024 16:29
Copy link
Owner

@dani-garcia dani-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, patching the dependency for now sounds good, we don't want to be dragging lots of old transitive dependencies if we can avoid it.

err_silent!("The 'sqlite' feature is not enabled. Backups only works for SQLite databases")
async fn backup_sqlite() -> Result<String, Error> {
use crate::db::{backup_database, DbConnType};
if DbConnType::from_url(&CONFIG.database_url()).map(|t| t == DbConnType::sqlite).unwrap_or(false) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check for the database type here? We're already doing that inside backup_database as far as I can see.

@dani-garcia dani-garcia merged commit 71b3d3c into dani-garcia:main Dec 5, 2024
5 checks passed
@pquantin pquantin mentioned this pull request Dec 8, 2024
@BlackDex BlackDex deleted the update-rust-and-crates branch December 11, 2024 10:32
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

Successfully merging this pull request may close these issues.

3 participants