fix: Remove outdated barrier when automatically inserting drops#1558
fix: Remove outdated barrier when automatically inserting drops#1558maximilianruesch merged 2 commits intoQuantinuum:mainfrom
Conversation
|
Please remember that the issue title often does not suffice as a descriptive enough PR title, and they serve different purposes: An issue title often describes the problem or symptom, and the PR title should describe the solution / broader goal. This is in line with the knowledge about a task at the respective creation times. I have amended your PR title for this one as an example. |
|
Thank You @maximilianruesch , so it is not about reproducing the issue title, rather a more descriptive (briefly) title about the approach/solution. |
|
Yes. In essence, this title directly goes into the changelog, and it appears in the commit message in the git history (which is essentially a more detailed changelog). Whenever someone reads that, they want to have a summary of what has been changed or at least of what has been fixed (to a reasonable level of detail). "Closed issue mentioned in a comment" is neither descriptive nor helpful to someone reading the history, as it offers no explanation as to what has been done and why. On the other hand, the current title offers several points: "Remove redundant" signals that something that is no longer needed was removed, and the change should have no impact on the semantics of the program; "when automatically inserting drops" signals the place of the change, thus making it easier to find for people looking for changes related to drop semantics. |
mark-koch
left a comment
There was a problem hiding this comment.
Thanks! This looks good, however the CI checks are failing due to formatting. Can you please run ruff format and check that the CI passes?
Remove stale
FuncDefnskip in insert_drops (#1516)Removes a workaround in
insert_drops (core.py)that skipped allFuncDefnnodes during drop insertion. The skip wasadded to work around a
num_out_portsbug in hugr (Quantinuum/hugr#2438), which has since been fixed in hugr 0.15.4 —the version guppylang already depends on. The guard is also redundant because
FuncDefnoutputs areFunctionKind,neverValueKind,so no drop would have been inserted anyway.Changes:
insert_dropsin compiler/core.py (the stale comment referencing #2438, theisinstance(data.op, ops.FuncDefn)check, and the continue)test_drop_with_multiple_funcdefnsto tests/integration/test_drop_insertion.pyCloses #1516