Skip to content

Commit

Permalink
chore: Fix miri test (#1938)
Browse files Browse the repository at this point in the history
Fixes #1931 

Test run: https://github.com/CQCL/hugr/actions/runs/13549274743

drive-by: Fix automated issue comment, and check target branch before
making the comments

Semver-checks failing due to #1940
  • Loading branch information
aborgna-q authored Feb 28, 2025
1 parent f667b4e commit b760ef8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/unsoundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
create-issue:
uses: CQCL/hugrverse-actions/.github/workflows/create-issue.yml@main
needs: miri
if: always() && needs.miri.result == 'failure'
if: always() && needs.miri.result == 'failure' && github.ref == 'refs/heads/main'
secrets:
GITHUB_PAT: ${{ secrets.HUGRBOT_PAT }}
with:
title: "💥 Unsoundness check failed on main"
title: "💥 Unsoundness check fail on main"
body: |
The unsoundness check for `CQCL/hugr` failed.
[https://github.com/CQCL/hugr/actions/runs/${{ github.run_id }}](Please investigate).
[Please investigate](https://github.com/CQCL/hugr/actions/runs/${{ github.run_id }}).
unique-label: "unsoundness-checks"
other-labels: "bug"
3 changes: 3 additions & 0 deletions hugr-core/src/ops/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,9 @@ pub(crate) mod test {
#[case(const_tuple_serialized(), const_tuple())]
#[case(const_array_bool(), const_array_bool())]
#[case(const_array_options(), const_array_options())]
// Opaque constants don't get resolved into concrete types when running miri,
// as the `typetag` machinery is not available.
#[cfg_attr(miri, ignore)]
fn const_serde_roundtrip(#[case] const_value: Value, #[case] expected_value: Value) {
let serialized = serde_json::to_string(&const_value).unwrap();
let deserialized: Value = serde_json::from_str(&serialized).unwrap();
Expand Down

0 comments on commit b760ef8

Please sign in to comment.