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

hugr-llvm: Export testing utilities #1673

Closed
doug-q opened this issue Nov 21, 2024 · 1 comment · Fixed by #1677
Closed

hugr-llvm: Export testing utilities #1673

doug-q opened this issue Nov 21, 2024 · 1 comment · Fixed by #1677
Assignees

Comments

@doug-q
Copy link
Collaborator

doug-q commented Nov 21, 2024

Once #1601 is merged:

hugr-llvm has some useful testing utilities in src/test.hs and src/emit/test.rs. In moving the lowering for the rotation extension to tket2 in CQCL/tket2#697 we removed some tests because they could no longer access those testing utilities.

Let's export these tools from hugr-llvm so that downstream crates can benefit from them. Being test code, it's not as polished as we would want, so a bit of tidying/renaming/documenting will be required. We can guard these tools with a feature if there is a benefit in doing so(i.e. making some dependencies optional).

We could also put the code in a new crate (say hugr-llvm-test) and add that crate as a dev-dependency to hugr-llvm. This would be a circular dependency (hugr-llvm -> hugr-llvm-test -> hugr-llvm), but this is allowed as one of the edges is a dev-dependency edge. It's not clear to me what the benefit of this would be.

@ss2165
Copy link
Member

ss2165 commented Nov 22, 2024

hugr-llvm is under the llvm hugr feature, I suggest exporting these under a new llvm-tests feature with all the test dependencies

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 a pull request may close this issue.

2 participants