-
Notifications
You must be signed in to change notification settings - Fork 13
fix!: Appease cargo-audit by replacing unmaintained dependencies
#2572
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
According to [`cargo-audit`](https://crates.io/crates/cargo-audit), there are a few RUSTSEC advisories lurking in `hugr` due to unmaintained dependencies: - `fxhash`, both directly and transitively via `relrc` - `instant`, transitively via `ascent` - `paste`, both directly and transitively via `ascent` This PR replaces local `fxhash` usage with the suggested [`rustc-hash`](https://crates.io/crates/rustc-hash) and `paste` with the successor [`pastey`](https://crates.io/crates/pastey). **Of note:** switching to `rustc-hash` changed a couple of the testing snapshots. I think everything is still in there, but the ordering has shuffled a bit. Of course, the transitive dependencies require updates to `ascent` and `relrc`; see [this `ascent`](s-arash/ascent#73) PR and [this `relrc`](lmondada/relrc#8) one. If/when those get merged and released, we'd want to bump the versions of those packages here, too. <details> <summary>Output of cargo audit</summary> ``` $ cargo audit Fetching advisory database from `https://github.com/RustSec/advisory-db.git` Loaded 820 security advisories (from /Users/graham/.cargo/advisory-db) Updating crates.io index Scanning Cargo.lock for vulnerabilities (416 crate dependencies) Crate: fxhash Version: 0.2.1 Warning: unmaintained Title: fxhash - no longer maintained Date: 2025-09-05 ID: RUSTSEC-2025-0057 URL: https://rustsec.org/advisories/RUSTSEC-2025-0057 Dependency tree: fxhash 0.2.1 ├── relrc 0.4.6 │ ├── hugr-persistent 0.2.3 │ │ └── hugr 0.22.3 │ │ ├── hugr-core 0.22.3 │ │ │ ├── hugr-persistent 0.2.3 │ │ │ ├── hugr-passes 0.22.3 │ │ │ │ └── hugr 0.22.3 │ │ │ ├── hugr-llvm 0.22.3 │ │ │ │ ├── hugr-llvm 0.22.3 │ │ │ │ └── hugr 0.22.3 │ │ │ └── hugr 0.22.3 │ │ └── hugr-cli 0.22.3 │ └── hugr-core 0.22.3 ├── hugr-model 0.22.3 │ ├── hugr-py 0.1.0 │ ├── hugr-core 0.22.3 │ └── hugr 0.22.3 └── hugr-core 0.22.3 Crate: instant Version: 0.1.13 Warning: unmaintained Title: `instant` is unmaintained Date: 2024-09-01 ID: RUSTSEC-2024-0384 URL: https://rustsec.org/advisories/RUSTSEC-2024-0384 Dependency tree: instant 0.1.13 └── ascent 0.8.0 └── hugr-passes 0.22.3 └── hugr 0.22.3 ├── hugr-core 0.22.3 │ ├── hugr-persistent 0.2.3 │ │ └── hugr 0.22.3 │ ├── hugr-passes 0.22.3 │ ├── hugr-llvm 0.22.3 │ │ ├── hugr-llvm 0.22.3 │ │ └── hugr 0.22.3 │ └── hugr 0.22.3 └── hugr-cli 0.22.3 Crate: paste Version: 1.0.15 Warning: unmaintained Title: paste - no longer maintained Date: 2024-10-07 ID: RUSTSEC-2024-0436 URL: https://rustsec.org/advisories/RUSTSEC-2024-0436 Dependency tree: paste 1.0.15 ├── hugr-py 0.1.0 ├── hugr-passes 0.22.3 │ └── hugr 0.22.3 │ ├── hugr-core 0.22.3 │ │ ├── hugr-persistent 0.2.3 │ │ │ └── hugr 0.22.3 │ │ ├── hugr-passes 0.22.3 │ │ ├── hugr-llvm 0.22.3 │ │ │ ├── hugr-llvm 0.22.3 │ │ │ └── hugr 0.22.3 │ │ └── hugr 0.22.3 │ └── hugr-cli 0.22.3 ├── hugr-core 0.22.3 ├── ascent_base 0.8.0 │ ├── ascent_macro 0.8.0 │ │ └── ascent 0.8.0 │ │ └── hugr-passes 0.22.3 │ └── ascent 0.8.0 └── ascent 0.8.0 warning: 3 allowed warnings found ``` </details> BREAKING CHANGE: replaced `fxhash` and `paste` with `rustc-hash` and `pastey`, respectively.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2572 +/- ##
=======================================
Coverage 82.95% 82.95%
=======================================
Files 254 254
Lines 47901 47901
Branches 43412 43412
=======================================
Hits 39734 39734
Misses 6106 6106
Partials 2061 2061
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Alas, I seem to have angered |
|
It's a fluke to your PR being based on an older |
|
Thanks @aborgna-q! I thought I had aimed at the latest |
|
Either is fine, rebase may be more annoying for you to update locally. |
aborgna-q
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks for the contribution!
## 🤖 New release
* `hugr-model`: 0.22.4 -> 0.23.0 (✓ API compatible changes)
* `hugr-core`: 0.22.4 -> 0.23.0 (⚠ API breaking changes)
* `hugr-llvm`: 0.22.4 -> 0.23.0 (✓ API compatible changes)
* `hugr-passes`: 0.22.4 -> 0.23.0 (⚠ API breaking changes)
* `hugr-persistent`: 0.2.3 -> 0.3.0 (✓ API compatible changes)
* `hugr`: 0.22.4 -> 0.23.0 (✓ API compatible changes)
* `hugr-cli`: 0.22.4 -> 0.23.0 (✓ API compatible changes)
### ⚠ `hugr-core` breaking changes
```text
--- failure enum_variant_missing: pub enum variant removed or renamed ---
Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.43.0/src/lints/enum_variant_missing.ron
Failed in:
variant PackageEncodingError::ExtensionVersion, previously in file /tmp/.tmp8eoQo1/hugr-core/src/envelope/package_json.rs:89
--- failure function_parameter_count_changed: pub fn parameter count changed ---
Description:
A publicly-visible function now takes a different number of parameters.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.43.0/src/lints/function_parameter_count_changed.ron
Failed in:
hugr_core::import::import_package now takes 3 parameters instead of 2, in /tmp/.tmpBTXSed/hugr/hugr-core/src/import.rs:187
--- failure struct_missing: pub struct removed or renamed ---
Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.43.0/src/lints/struct_missing.ron
Failed in:
struct hugr_core::extension::prelude::PRELUDE_REGISTRY, previously in file /tmp/.tmp8eoQo1/hugr-core/src/extension/prelude.rs:43
struct hugr_core::extension::PRELUDE_REGISTRY, previously in file /tmp/.tmp8eoQo1/hugr-core/src/extension/prelude.rs:43
struct hugr_core::std_extensions::logic::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/logic.rs:134
struct hugr_core::extension::prelude::PRELUDE, previously in file /tmp/.tmp8eoQo1/hugr-core/src/extension/prelude.rs:43
struct hugr_core::extension::PRELUDE, previously in file /tmp/.tmp8eoQo1/hugr-core/src/extension/prelude.rs:43
struct hugr_core::std_extensions::ptr::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/ptr.rs:112
struct hugr_core::std_extensions::arithmetic::int_types::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/arithmetic/int_types.rs:209
struct hugr_core::std_extensions::arithmetic::conversions::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/arithmetic/conversions.rs:174
struct hugr_core::std_extensions::collections::array::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/collections/array.rs:93
struct hugr_core::std_extensions::arithmetic::int_types::INT_TYPES, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/arithmetic/int_types.rs:49
struct hugr_core::std_extensions::arithmetic::float_types::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/arithmetic/float_types.rs:104
struct hugr_core::std_extensions::collections::static_array::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/collections/static_array.rs:142
struct hugr_core::std_extensions::collections::list::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/collections/list.rs:289
struct hugr_core::std_extensions::STD_REG, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions.rs:35
struct hugr_core::std_extensions::collections::value_array::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/collections/value_array.rs:99
struct hugr_core::std_extensions::collections::borrow_array::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/collections/borrow_array.rs:290
struct hugr_core::std_extensions::arithmetic::float_ops::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/arithmetic/float_ops.rs:115
struct hugr_core::std_extensions::arithmetic::int_ops::EXTENSION, previously in file /tmp/.tmp8eoQo1/hugr-core/src/std_extensions/arithmetic/int_ops.rs:254
```
### ⚠ `hugr-passes` breaking changes
```text
--- failure enum_missing: pub enum removed or renamed ---
Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.43.0/src/lints/enum_missing.ron
Failed in:
enum hugr_passes::non_local::NonLocalEdgesError, previously in file /tmp/.tmp8eoQo1/hugr-passes/src/non_local.rs:57
```
<details><summary><i><b>Changelog</b></i></summary><p>
## `hugr-model`
<blockquote>
##
[0.23.0](hugr-model-v0.22.4...hugr-model-v0.23.0)
- 2025-09-30
### Bug Fixes
- [**breaking**] Appease `cargo-audit` by replacing unmaintained
dependencies ([#2572](#2572))
### New Features
- Documentation and error hints
([#2523](#2523))
</blockquote>
## `hugr-core`
<blockquote>
##
[0.23.0](hugr-core-v0.22.4...hugr-core-v0.23.0)
- 2025-09-30
### Bug Fixes
- [**breaking**] Appease `cargo-audit` by replacing unmaintained
dependencies ([#2572](#2572))
- *(core)* check extension versions on model import
([#2580](#2580))
- [**breaking**] test extension version compatibility on ModelWithExts
([#2587](#2587))
- *(core)* check used extension versions against resolved extensions
([#2588](#2588))
- [**breaking**] model import loads Package extensions
([#2590](#2590))
### Miscellaneous Tasks
- [**breaking**] Cleanup deprecated definitions
([#2594](#2594))
### New Features
- add trait+funcs for linking Hugrs explicitly by Node
([#2521](#2521))
- Documentation and error hints
([#2523](#2523))
- Allow creating DFG builders from existing hugrs
([#2562](#2562))
- add_input/output for arbitrary DFGBuilders
([#2564](#2564))
- [**breaking**] Return error instead of panicking in
DFGWrapper::add_{in,out}put
([#2571](#2571))
- *(core)* inner acccesors for WithGenerator error
([#2583](#2583))
- Normalize CFGs ([#2591](#2591))
### Refactor
- [**breaking**] Replace lazy_static with std::sync::LazyLock
([#2567](#2567))
</blockquote>
## `hugr-llvm`
<blockquote>
##
[0.23.0](hugr-llvm-v0.22.4...hugr-llvm-v0.23.0)
- 2025-09-30
### Miscellaneous Tasks
- [**breaking**] Cleanup deprecated definitions
([#2594](#2594))
### Refactor
- [**breaking**] Replace lazy_static with std::sync::LazyLock
([#2567](#2567))
### Testing
- Add framework for LLVM execution tests involving panics
([#2568](#2568))
</blockquote>
## `hugr-passes`
<blockquote>
##
[0.23.0](hugr-passes-v0.22.4...hugr-passes-v0.23.0)
- 2025-09-30
### Bug Fixes
- DeadCodeElim keeps consumers of linear outputs
([#2560](#2560))
- [**breaking**] Appease `cargo-audit` by replacing unmaintained
dependencies ([#2572](#2572))
### Miscellaneous Tasks
- [**breaking**] Cleanup deprecated definitions
([#2594](#2594))
### New Features
- [**breaking**] DeadCodeElimPass reports error on non-existent
entry_points ([#2566](#2566))
- Normalize CFGs ([#2591](#2591))
### Refactor
- [**breaking**] Replace lazy_static with std::sync::LazyLock
([#2567](#2567))
</blockquote>
## `hugr-persistent`
<blockquote>
##
[0.3.0](hugr-persistent-v0.2.3...hugr-persistent-v0.3.0)
- 2025-09-30
### Miscellaneous Tasks
- [**breaking**] Cleanup deprecated definitions
([#2594](#2594))
### Refactor
- [**breaking**] Replace lazy_static with std::sync::LazyLock
([#2567](#2567))
</blockquote>
## `hugr`
<blockquote>
##
[0.23.0](hugr-v0.22.4...hugr-v0.23.0)
- 2025-09-30
### Bug Fixes
- DeadCodeElim keeps consumers of linear outputs
([#2560](#2560))
- [**breaking**] Appease `cargo-audit` by replacing unmaintained
dependencies ([#2572](#2572))
- *(core)* check extension versions on model import
([#2580](#2580))
- [**breaking**] test extension version compatibility on ModelWithExts
([#2587](#2587))
- *(core)* check used extension versions against resolved extensions
([#2588](#2588))
- [**breaking**] model import loads Package extensions
([#2590](#2590))
### Miscellaneous Tasks
- [**breaking**] Cleanup deprecated definitions
([#2594](#2594))
### New Features
- [**breaking**] DeadCodeElimPass reports error on non-existent
entry_points ([#2566](#2566))
- add trait+funcs for linking Hugrs explicitly by Node
([#2521](#2521))
- Documentation and error hints
([#2523](#2523))
- Allow creating DFG builders from existing hugrs
([#2562](#2562))
- add_input/output for arbitrary DFGBuilders
([#2564](#2564))
- [**breaking**] Return error instead of panicking in
DFGWrapper::add_{in,out}put
([#2571](#2571))
- *(core)* inner acccesors for WithGenerator error
([#2583](#2583))
- Normalize CFGs ([#2591](#2591))
### Refactor
- [**breaking**] Replace lazy_static with std::sync::LazyLock
([#2567](#2567))
</blockquote>
## `hugr-cli`
<blockquote>
##
[0.22.3](hugr-cli-v0.22.2...hugr-cli-v0.22.3)
- 2025-09-11
### New Features
- *(hugr-cli)* CliError::validate helper
([#2507](#2507))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
## 🤖 New release * `hugr-model`: 0.23.0 -> 0.24.0 * `hugr-core`: 0.23.0 -> 0.24.0 (✓ API compatible changes) * `hugr-llvm`: 0.23.0 -> 0.24.0 (✓ API compatible changes) * `hugr-passes`: 0.23.0 -> 0.24.0 (✓ API compatible changes) * `hugr-persistent`: 0.3.0 -> 0.3.1 (✓ API compatible changes) * `hugr`: 0.23.0 -> 0.24.0 (✓ API compatible changes) * `hugr-cli`: 0.23.0 -> 0.24.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `hugr-model` <blockquote> ## [0.23.0](hugr-model-v0.22.4...hugr-model-v0.23.0) - 2025-09-30 ### Bug Fixes - [**breaking**] Appease `cargo-audit` by replacing unmaintained dependencies ([#2572](#2572)) ### New Features - Documentation and error hints ([#2523](#2523)) </blockquote> ## `hugr-core` <blockquote> ## [0.24.0](hugr-core-v0.23.0...hugr-core-v0.24.0) - 2025-10-13 ### Bug Fixes - Preserve offset for CFG edges when serializing to JSON ([#2606](#2606)) ### New Features - LLVM lowering for borrow arrays using bitmasks ([#2574](#2574)) - *(py, core, llvm)* add `is_borrowed` op for BorrowArray ([#2610](#2610)) ### Refactor - [**breaking**] consistent inout order in borrow array ([#2621](#2621)) </blockquote> ## `hugr-llvm` <blockquote> ## [0.24.0](hugr-llvm-v0.23.0...hugr-llvm-v0.24.0) - 2025-10-13 ### New Features - LLVM lowering for borrow arrays using bitmasks ([#2574](#2574)) - *(py, core, llvm)* add `is_borrowed` op for BorrowArray ([#2610](#2610)) ### Refactor - [**breaking**] consistent inout order in borrow array ([#2621](#2621)) </blockquote> ## `hugr-passes` <blockquote> ## [0.24.0](hugr-passes-v0.23.0...hugr-passes-v0.24.0) - 2025-10-13 ### New Features - Add handler for copying / discarding borrow arrays to default lineariser ([#2602](#2602)) </blockquote> ## `hugr-persistent` <blockquote> ## [0.3.1](hugr-persistent-v0.3.0...hugr-persistent-v0.3.1) - 2025-10-13 ### Bug Fixes - *(test)* No extension serialisation in persistent-hugr testing ([#2612](#2612)) ### New Features - *(persistent)* Redesign CommitStateSpace, bound Commit lifetime ([#2534](#2534)) </blockquote> ## `hugr` <blockquote> ## [0.24.0](hugr-v0.23.0...hugr-v0.24.0) - 2025-10-13 ### Bug Fixes - Preserve offset for CFG edges when serializing to JSON ([#2606](#2606)) ### New Features - Add handler for copying / discarding borrow arrays to default lineariser ([#2602](#2602)) - LLVM lowering for borrow arrays using bitmasks ([#2574](#2574)) - *(py, core, llvm)* add `is_borrowed` op for BorrowArray ([#2610](#2610)) ### Refactor - [**breaking**] consistent inout order in borrow array ([#2621](#2621)) </blockquote> ## `hugr-cli` <blockquote> ## [0.24.0](hugr-cli-v0.23.0...hugr-cli-v0.24.0) - 2025-10-13 ### Documentation - update cli readme ([#2601](#2601)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).

According to
cargo-audit, there are a few RUSTSEC advisories lurking inhugrdue to unmaintained dependencies:fxhash, both directly and transitively viarelrcinstant, transitively viaascentpaste, both directly and transitively viaascentThis PR replaces local
fxhashusage with the suggestedrustc-hashandpastewith the successorpastey.Of note: switching to
rustc-hashchanged a couple of the testing snapshots. I think everything is still in there, but the ordering has shuffled a bit.Of course, the transitive dependencies require updates to
ascentandrelrc; see thisascentPR and thisrelrcone. If/when those get merged and released, we'd want to bump the versions of those packages here, too.Output of cargo audit
BREAKING CHANGE: replaced
fxhashandpastewithrustc-hashandpastey, respectively.Title override for python releaser, since this change affects the
hugr-pylibrary but we don't want to mark it as breaking thereBEGIN_COMMIT_OVERRIDE
chore: Appease cargo-audit by replacing unmaintained dependencies
END_COMMIT_OVERRIDE