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

feat(hugr-core): Add impl Hash for Type #1347

Merged
merged 1 commit into from
Jul 25, 2024
Merged

feat(hugr-core): Add impl Hash for Type #1347

merged 1 commit into from
Jul 25, 2024

Conversation

doug-q
Copy link
Collaborator

@doug-q doug-q commented Jul 25, 2024

Note that I have made a choice here to include PolyFuncType and TypeParam. We could exclude TypeParam by not including TypeArgVariable::cached_decl in the Hash (and PartialEq, Eq, which would be a change of behaviour).

@doug-q doug-q requested a review from a team as a code owner July 25, 2024 08:17
@doug-q doug-q requested a review from acl-cqc July 25, 2024 08:17
@doug-q doug-q linked an issue Jul 25, 2024 that may be closed by this pull request
@doug-q doug-q requested review from aborgna-q and removed request for acl-cqc July 25, 2024 08:19
@doug-q
Copy link
Collaborator Author

doug-q commented Jul 25, 2024

Manually changing reviewer as Alan is off today and I'd like to release this ASAP.

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.

Project coverage is 87.48%. Comparing base (540eb23) to head (38a5892).

Files Patch % Lines
hugr-core/src/types/row_var.rs 0.00% 2 Missing ⚠️
hugr-core/src/types/type_param.rs 50.00% 0 Missing and 2 partials ⚠️
hugr-core/src/types/poly_func.rs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1347   +/-   ##
=======================================
  Coverage   87.48%   87.48%           
=======================================
  Files         111      111           
  Lines       19789    19789           
  Branches    17522    17522           
=======================================
  Hits        17313    17313           
  Misses       1702     1702           
  Partials      774      774           
Flag Coverage Δ
python 91.53% <ø> (ø)
rust 86.96% <64.28%> (ø)

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.

@doug-q doug-q changed the title feat: Add impl Hash for Type feat(hugr-core): Add impl Hash for Type Jul 25, 2024
Copy link
Collaborator

@aborgna-q aborgna-q left a comment

Choose a reason for hiding this comment

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

cached_decl should be alright, since the value is always present (vs. lazily computed and cached).

LGTM

@doug-q doug-q added this pull request to the merge queue Jul 25, 2024
Merged via the queue into main with commit b0a6615 Jul 25, 2024
22 of 23 checks passed
@doug-q doug-q deleted the doug/hash-type branch July 25, 2024 08:35
@hugrbot hugrbot mentioned this pull request Jul 24, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 29, 2024
## 🤖 New release
* `hugr`: 0.9.1 -> 0.10.0
* `hugr-core`: 0.6.1 -> 0.7.0
* `hugr-passes`: 0.6.1 -> 0.6.2
* `hugr-cli`: 0.2.1 -> 0.3.0

<details><summary><i><b>Changelog</b></i></summary><p>

## `hugr`
<blockquote>

## 0.10.0 (2024-07-26)

### Bug Fixes

(#1350))
- [**breaking**] Bump serialisation version with no upgrade path
([#1352](#1352))

### Features

- Add `nonlocal_edges` and `ensure_no_nonlocal_edges`
([#1345](#1345))
- Serialization upgrade path
([#1327](#1327))
- [**breaking**] Replace opaque type arguments with String
([#1328](#1328))
- Add `impl Hash for Type`
([#1347](#1347))
- `HasDef` and `HasConcrete` traits for def/concrete op design pattern
([#1336](#1336))
- Add pointer standard extension
([#1337](#1337))
- [**breaking**] Remove the `Eq` type bound.
([#1364](#1364))

### Refactor

- [**breaking**] Use JSON rather than YAML in opaque fields.
([#1338](#1338))
- [**breaking**] Declarative module behind optional feature flag
([#1341](#1341))

### Testing

- Miri gate serialization upgrades
([#1349](#1349))
</blockquote>

## `hugr-core`
<blockquote>

## 0.7.0 (2024-07-26)

### Bug Fixes

(#1350))
- [**breaking**] Bump serialisation version with no upgrade path
([#1352](#1352))

### Features

- Serialization upgrade path
([#1327](#1327))
- [**breaking**] Replace opaque type arguments with String
([#1328](#1328))
- Add `impl Hash for Type`
([#1347](#1347))
- `HasDef` and `HasConcrete` traits for def/concrete op design pattern
([#1336](#1336))
- Add pointer standard extension
([#1337](#1337))
- [**breaking**] Remove the `Eq` type bound.
([#1364](#1364))

### Refactor

- [**breaking**] Use JSON rather than YAML in opaque fields.
([#1338](#1338))
- [**breaking**] Declarative module behind optional feature flag
([#1341](#1341))

### Testing

- Miri gate serialization upgrades
([#1349](#1349))
</blockquote>

## `hugr-passes`
<blockquote>

## 0.6.2 (2024-07-26)

### Features

- Add `nonlocal_edges` and `ensure_no_nonlocal_edges`
([#1345](#1345))
</blockquote>

## `hugr-cli`
<blockquote>

## 0.3.0 (2024-07-26)

### Features

- [**breaking**] Created `validate` CLI subcommand.
([#1312](#1312))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

---------

Co-authored-by: Douglas Wilson <[email protected]>
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.

add impl Hash for Type.
2 participants