Skip to content

Conversation

@lmondada
Copy link
Contributor

@lmondada lmondada commented Aug 25, 2025

ended up being a bit more work than expected! With this PR, SiblingSubgraph supports incoming boundary static edges that link a function declared/defined outside of the subgraph to a call within the subgraph.

I've taken the opportunity to clean up the docs and error handling for any non-value (and non-function static edges).

@lmondada lmondada force-pushed the lm/support-fn-calls branch 2 times, most recently from 5273b2f to 9917f77 Compare August 25, 2025 10:48
@lmondada lmondada force-pushed the lm/support-fn-calls branch from 9917f77 to 31ce577 Compare August 25, 2025 10:49
@lmondada lmondada marked this pull request as ready for review August 25, 2025 10:52
@lmondada lmondada requested a review from a team as a code owner August 25, 2025 10:52
@lmondada lmondada requested review from aborgna-q and zrho and removed request for zrho August 25, 2025 10:52
@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.66%. Comparing base (6e6ec0b) to head (8e3070d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2528      +/-   ##
==========================================
- Coverage   82.67%   82.66%   -0.01%     
==========================================
  Files         252      252              
  Lines       46814    46781      -33     
  Branches    42330    42297      -33     
==========================================
- Hits        38702    38673      -29     
+ Misses       6061     6058       -3     
+ Partials     2051     2050       -1     
Flag Coverage Δ
python 91.41% <ø> (ø)

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.

&& op
.static_input()
.expect("static input exists")
.is_function()
Copy link
Collaborator

@aborgna-q aborgna-q Aug 25, 2025

Choose a reason for hiding this comment

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

Not necessary for this PR, but would we need to change much to also support external const loads?
Loads have an EdgeKind::Const static input, but the rest seems quite similar to function calls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah good point! It would probably be straightforward. I'll open an issue for that.

@lmondada lmondada added this pull request to the merge queue Aug 25, 2025
Merged via the queue into main with commit daf6cfe Aug 25, 2025
25 of 26 checks passed
@lmondada lmondada deleted the lm/support-fn-calls branch August 25, 2025 17:05
@hugrbot hugrbot mentioned this pull request Aug 25, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 15, 2025
## 🤖 New release

* `hugr-model`: 0.22.2 -> 0.22.3 (✓ API compatible changes)
* `hugr-core`: 0.22.2 -> 0.22.3 (✓ API compatible changes)
* `hugr-llvm`: 0.22.2 -> 0.22.3 (✓ API compatible changes)
* `hugr-passes`: 0.22.2 -> 0.22.3 (✓ API compatible changes)
* `hugr-persistent`: 0.2.2 -> 0.2.3 (✓ API compatible changes)
* `hugr`: 0.22.2 -> 0.22.3 (✓ API compatible changes)
* `hugr-cli`: 0.22.2 -> 0.22.3 (✓ API compatible changes)

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

## `hugr-model`

<blockquote>

##
[0.22.2](hugr-model-v0.22.1...hugr-model-v0.22.2)
- 2025-08-06

### New Features

- Type of constants in `core` `Term`s.
([#2411](#2411))
</blockquote>

## `hugr-core`

<blockquote>

##
[0.22.3](hugr-core-v0.22.2...hugr-core-v0.22.3)
- 2025-09-11

### Bug Fixes

- SiblingSubgraph::try_from_nodes not including disconnected components
([#2549](#2549))

### Documentation

- Clarify docs for SiblingSubgraph::{inputs, outputs}
([#2508](#2508))

### New Features

- SiblingSubgraph supports function calls
([#2528](#2528))
- Add unchecked constructor for SiblingSubgraph
([#2526](#2526))
- Add HugrMut::insert(_view)_forest
([#2518](#2518))
- Add extend_inputs function for DFGs
([#2536](#2536))
- Loosen bound on Patch trait
([#2545](#2545))
</blockquote>

## `hugr-llvm`

<blockquote>

##
[0.22.2](hugr-llvm-v0.22.1...hugr-llvm-v0.22.2)
- 2025-08-06

### Bug Fixes

- added public func getter for EmitFuncContext
([#2482](#2482))
- *(hugr-llvm)* Set llvm function linkage based on Visibility hugr node
field ([#2502](#2502))
</blockquote>

## `hugr-passes`

<blockquote>

##
[0.22.3](hugr-passes-v0.22.2...hugr-passes-v0.22.3)
- 2025-09-11

### New Features

- SiblingSubgraph supports function calls
([#2528](#2528))
</blockquote>

## `hugr-persistent`

<blockquote>

##
[0.2.3](hugr-persistent-v0.2.2...hugr-persistent-v0.2.3)
- 2025-09-11

### Documentation

- Clarify docs for SiblingSubgraph::{inputs, outputs}
([#2508](#2508))

### New Features

- SiblingSubgraph supports function calls
([#2528](#2528))
</blockquote>

## `hugr`

<blockquote>

##
[0.22.3](hugr-v0.22.2...hugr-v0.22.3)
- 2025-09-11

### Bug Fixes

- SiblingSubgraph::try_from_nodes not including disconnected components
([#2549](#2549))

### Documentation

- Clarify docs for SiblingSubgraph::{inputs, outputs}
([#2508](#2508))

### New Features

- SiblingSubgraph supports function calls
([#2528](#2528))
- Add unchecked constructor for SiblingSubgraph
([#2526](#2526))
- Add extend_inputs function for DFGs
([#2536](#2536))
- Loosen bound on Patch trait
([#2545](#2545))
- Add HugrMut::insert(_view)_forest
([#2518](#2518))
</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/).
@hugrbot hugrbot mentioned this pull request Sep 16, 2025
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.

3 participants