Skip to content

Conversation

@EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented Apr 17, 2025

Fixes #50

Although various non-gix-* crates are included among those updated, the main anticipated impact of this change is to make it so the versions of gix-features and associated gix-* crates used as non-dev dependencies have the fix for RUSTSEC-2025-0021.

For more details, see #50 and this gist.

Edit: I suggest merging this before #52 (or only this, if you don't want #52) for the reason detailed there.


This is not ready yet because there are some clippy errors. I hope that's the only problem.

Edit: I've fixed the clippy warning that caused CI to fail, made clippy more stringent on CI so that it would report the other clippy warning that I got locally since that is also new and seemed like it should be addressed too (see commit messages for details), and fixed that too.

I have refrained from making other CI improvements, such as installing and caching crates to speed up CI, since they are not needed to evaluate whether the changes here are okay. Those could be done in a later PR.

I think this is ready to merge. The security audit check failure is due to the remaining dev-only dependency on the vulnerable gix-features. Note that there is now just "1 vulnerability" rather than "2 vulnerabilities" as on main.

This runs `cargo update` to fix GitoxideLabs#50.

Although various non-`gix-*` crates are included among those
updated, the main anticipated impact of this change is to make it
so the versions of `gix-features` and associated `gix-*` crates
used as non-dev dependencies have the fix for RUSTSEC-2025-0021.

For more details, see GitoxideLabs#50 and:
https://gist.github.com/EliahKagan/b9591e61ae94c3680ffa20a20d384efe
This removes a call to `to_string()` that is no longer necessary:

    warning: `to_string` applied to a type that implements `Display` in `trace!` args
       --> src/command/release/manifest.rs:568:52
        |
    568 | ...                   current_version_req.to_string()
        |                                          ^^^^^^^^^^^^ help: remove this
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
        = note: `#[warn(clippy::to_string_in_format_args)]` on by default

Because `cargo clippy` is run on CI with `--allow deprecated`, this
is enough to make it pass on CI. However, running `cargo clippy`
without `--allow deprecated` also complains about the use of the
deprecated type alias `winnow::PResult`. That other warning is also
new since the immediately preceding run of `cargo update`. This
commit does not fix that warning.
The version update in GitoxideLabs#51 is creating new such warnings. This
suggests they should be enabled in order to avoid putting off
fixes. `--allow deprecated` could be put back later, if necessary.
This adapts to `winnow` changes. Specifically, `changelog.parse`
was using `PResult`, which is deprecated since `winnow` 0.6.25:

https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md#0625---2025-01-27

This changes from `PResult` to `ModalResult`, which is its
recommended replacement.

At this time, with the current version, `PResult` is an alias for
`ModalResult`. So while this does not establish that the version
upgrade itself hasn't caused unwanted behavioral changes, replacing
`PResult` with `ModalResult` given that we are at this version does
not cause any such problem.

The `clippy` warning this fixes is:

    warning: use of deprecated type alias `winnow::PResult`: Replaced with ModalResult
       --> src/changelog/parse.rs:473:95
        |
    473 | fn headline<'a, E: ParserError<&'a str> + FromExternalError<&'a str, ()>>(i: &mut &'a str) -> PResult<Headline...
        |                                                                                               ^^^^^^^
        |
        = note: `#[warn(deprecated)]` on by default
@EliahKagan EliahKagan force-pushed the run-ci/cargo-update branch from 47ad379 to 5386a41 Compare April 18, 2025 00:12
@EliahKagan EliahKagan marked this pull request as ready for review April 18, 2025 00:24
@Byron
Copy link
Member

Byron commented Apr 18, 2025

Thanks a lot, amazing work!

@Byron Byron merged commit dfa7a85 into GitoxideLabs:main Apr 18, 2025
12 of 13 checks passed
@EliahKagan EliahKagan deleted the run-ci/cargo-update branch April 18, 2025 16:09
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.

Vulnerable gix-features is not only a dev dependency

2 participants