Skip to content

Conversation

@aborgna-q
Copy link
Collaborator

HugrMutInternals is part of the semi-private traits defined in hugr-core.
While most things get re-exported in hugr, we *Internal traits require you to explicitly declare a dependency on the -core package (as we don't want most users to have to interact with them).

For some reason there was a public re-export of the trait in a re-exported module, so it ended up appearing in hugr anyways.

BREAKING CHANGE: Removed public re-export of HugrMutInternals from hugr.

@aborgna-q aborgna-q requested a review from a team as a code owner April 8, 2025 16:02
@aborgna-q aborgna-q requested a review from cqc-alec April 8, 2025 16:02
@aborgna-q aborgna-q added breaking-change Changes that break semver wait to merge labels Apr 8, 2025
@aborgna-q aborgna-q marked this pull request as draft April 8, 2025 16:03
@aborgna-q aborgna-q added this to the hugr-rs 0.16 milestone Apr 8, 2025
@aborgna-q
Copy link
Collaborator Author

Added to the next breaking-change milestone

@codecov
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-rs-v0.16.0@209b2ea). Learn more about missing BASE report.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             release-rs-v0.16.0    #2071   +/-   ##
=====================================================
  Coverage                      ?   82.90%           
=====================================================
  Files                         ?      217           
  Lines                         ?    41534           
  Branches                      ?    37712           
=====================================================
  Hits                          ?    34435           
  Misses                        ?     5295           
  Partials                      ?     1804           
Flag Coverage Δ
python 85.40% <ø> (?)
rust 82.65% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hugrbot
Copy link
Collaborator

hugrbot commented Apr 8, 2025

This PR contains breaking changes to the public Rust API.

cargo-semver-checks summary

--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait 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.40.0/src/lints/trait_missing.ron

Failed in:
trait hugr_core::hugr::rewrite::simple_replace::HugrMutInternals, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/hugr/internal.rs:209

--- failure trait_removed_supertrait: supertrait removed or renamed ---

Description:
A supertrait was removed from a trait. Users of the trait can no longer assume it can also be used like its supertrait.
      ref: https://doc.rust-lang.org/reference/items/traits.html#supertraits
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/trait_removed_supertrait.ron

Failed in:
supertrait hugr_core::hugr::rewrite::simple_replace::HugrMutInternals of trait HugrMut in file /home/runner/work/hugr/hugr/PR_BRANCH/hugr-core/src/hugr/hugrmut.rs:22

@aborgna-q aborgna-q force-pushed the ab/dont-expose-internals branch from d76a3cc to 6489456 Compare April 15, 2025 14:22
@aborgna-q aborgna-q marked this pull request as ready for review April 15, 2025 14:22
@aborgna-q aborgna-q changed the base branch from main to release-rs-v0.16.0 April 15, 2025 14:23
@aborgna-q aborgna-q merged commit ef1cba0 into release-rs-v0.16.0 Apr 15, 2025
26 checks passed
@aborgna-q aborgna-q deleted the ab/dont-expose-internals branch April 15, 2025 15:02
aborgna-q added a commit that referenced this pull request May 7, 2025
`HugrMutInternals` is part of the semi-private traits defined in
`hugr-core`.
While most things get re-exported in `hugr`, we `*Internal` traits
require you to explicitly declare a dependency on the `-core` package
(as we don't want most users to have to interact with them).

For some reason there was a public re-export of the trait in a
re-exported module, so it ended up appearing in `hugr` anyways.

BREAKING CHANGE: Removed public re-export of `HugrMutInternals` from
`hugr`.
This was referenced May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Changes that break semver wait to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants