microsoft / qsharp-compiler

Q# compiler, command line tool, and Q# language server
https://docs.microsoft.com/quantum
MIT License
684 stars 170 forks source link

Deprecated operation call in VS Code template #607

Closed msoeken closed 3 years ago

msoeken commented 4 years ago

Assert is deprecated. I suggest to replace it with AssertMeasurement.

https://github.com/microsoft/qsharp-compiler/blob/20c020d889915f2f19d996b5e2dc6a23fe2b6075/src/VSCodeExtension/templates/unittest/Tests.qs#L11

bamarsha commented 4 years ago

Thanks for catching this!

It looks like there is also an identical template here: https://github.com/microsoft/qsharp-compiler/blob/6ffb9e3a0a0b6c0790259996f5785971946f1468/src/ProjectTemplates/Quantum.Test1/Tests.qs#L12

The duplicate templates were added to the VS Code extension by #515. @ricardo-espinoza Do you know if it's possible to have only one copy of the templates to make it easier to update them?

ricardo-espinoza commented 4 years ago

We split the templates between VS, VSC and CL versions since requirements are slightly different in their specification format and now that we have the VSC ones embedded in the extension itself they are no longer relying on the command line ones.

But you raise a good point, we could explore "templating the templates", and produce them in a similar way to what bootstrap does and so they can in turn be embedded in the corresponding places. Let's chat about this idea some time next week.