Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Allow rewrite steps to declare dependencies on other rewrite steps #1384

Open
bamarsha opened this issue Mar 21, 2022 · 0 comments
Open

Allow rewrite steps to declare dependencies on other rewrite steps #1384

bamarsha opened this issue Mar 21, 2022 · 0 comments
Labels
enhancement New request or suggestion for an improvement

Comments

@bamarsha
Copy link
Contributor

bamarsha commented Mar 21, 2022

Issues #1377 and microsoft/iqsharp#606 show that lambdas need to be lifted before code gen and serialization can run. However, the compiler doesn't know this, and it tries to perform steps even when the compiler configuration or previous errors prevent lambda lifting from running. This leads to confusing error messages.

(Even with microsoft/qsharp#606 fixed by #1381, the fix only changes the default configuration - turning off lambda lifting will still cause a confusing error message, instead of one that mentions that code gen can't run without lambda lifting.)

The current design of each rewrite step being toggled independently, and using integers to indicate the order in which they should run, seems error prone. A cleaner design could be to have each rewrite step specify which steps need to run before it, so that when previous steps are disabled, later steps can be automatically skipped.

@bamarsha bamarsha added the enhancement New request or suggestion for an improvement label Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New request or suggestion for an improvement
Projects
None yet
Development

No branches or pull requests

1 participant