Skip to content

feat: Faster import/export through better name handling. #2055

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zrho
Copy link
Contributor

@zrho zrho commented Apr 2, 2025

No description provided.

Copy link

codecov bot commented Apr 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.16%. Comparing base (a16389f) to head (265de15).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2055      +/-   ##
==========================================
- Coverage   83.17%   83.16%   -0.01%     
==========================================
  Files         217      217              
  Lines       42034    41951      -83     
  Branches    38232    38129     -103     
==========================================
- Hits        34962    34890      -72     
- Misses       5113     5118       +5     
+ Partials     1959     1943      -16     
Flag Coverage Δ
python 85.40% <ø> (-0.40%) ⬇️

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 2, 2025

This PR contains breaking changes to the public Rust API.
Please deprecate the old API instead (if possible), or mark the PR with a ! to indicate a breaking change.

cargo-semver-checks summary

--- 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.40.0/src/lints/enum_missing.ron

Failed in:
enum hugr_core::import::OrderHintError, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/import.rs:78

--- 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.40.0/src/lints/enum_variant_missing.ron

Failed in:
variant ImportError::OrderHint, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/import.rs:73

--- failure derive_trait_impl_removed: built-in derived trait no longer implemented ---

Description:
A public type has stopped deriving one or more traits. This can break downstream code that depends on those types implementing those traits.
      ref: https://doc.rust-lang.org/reference/attributes/derive.html#derive
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/derive_trait_impl_removed.ron

Failed in:
type Symbol no longer derives Copy, in /home/runner/work/hugr/hugr/PR_BRANCH/hugr-model/src/v0/table/mod.rs:290
type Param no longer derives Copy, in /home/runner/work/hugr/hugr/PR_BRANCH/hugr-model/src/v0/table/mod.rs:375

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn 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.40.0/src/lints/inherent_method_missing.ron

Failed in:
Operation::symbol, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-model/src/v0/table/mod.rs:241

--- failure method_requires_different_generic_type_params: method now requires a different number of generic type parameters ---

Description:
A method now requires a different number of generic type parameters than it used to. Uses of this method that supplied the previous number of generic types will be broken.
      ref: https://doc.rust-lang.org/reference/items/generics.html
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/method_requires_different_generic_type_params.ron

Failed in:
hugr_model::v0::scope::SymbolTable::resolve takes 1 generic types instead of 0, in /home/runner/work/hugr/hugr/PR_BRANCH/hugr-model/src/v0/scope/symbol.rs:157

--- failure pub_module_level_const_missing: pub module-level const is missing ---

Description:
A public const is missing or renamed
      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/pub_module_level_const_missing.ron

Failed in:
ORDER_HINT_KEY in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-model/src/v0/mod.rs:278
ORDER_HINT_ORDER in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-model/src/v0/mod.rs:293

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field 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.40.0/src/lints/struct_pub_field_missing.ron

Failed in:
field 2 of struct DuplicateSymbolError, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-model/src/v0/scope/symbol.rs:198

--- failure type_mismatched_generic_lifetimes: type now takes a different number of generic lifetimes ---

Description:
A type now takes a different number of generic lifetime parameters. Uses of this type that name the previous number of parameters will be broken.
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/type_mismatched_generic_lifetimes.ron
Failed in:
Struct SymbolTable (1 -> 0 lifetime params) in /home/runner/work/hugr/hugr/PR_BRANCH/hugr-model/src/v0/scope/symbol.rs:47
Struct DuplicateSymbolError (1 -> 0 lifetime params) in /home/runner/work/hugr/hugr/PR_BRANCH/hugr-model/src/v0/scope/symbol.rs:234
Struct UnknownSymbolError (1 -> 0 lifetime params) in /home/runner/work/hugr/hugr/PR_BRANCH/hugr-model/src/v0/scope/symbol.rs:229
Struct Param (1 -> 0 lifetime params) in /home/runner/work/hugr/hugr/PR_BRANCH/hugr-model/src/v0/table/mod.rs:375

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.

2 participants