microsoft / qsharp

Azure Quantum Development Kit, including the Q# programming language, resource estimator, and Quantum Katas
https://microsoft.github.io/qsharp/
MIT License
451 stars 90 forks source link

Consider more informative guidance for customers trying to migrate code #699

Open billti opened 1 year ago

billti commented 1 year ago

Rather than just 'identifier not found' (such as for trying to use an API from the old library that no longer exists), or 'syntax error' (such as for interpolated string changes), we could perhaps detect these cases and have a more helpful error message, perhaps redirecting to a page that lists the changes and how to migrate such code (or open an issue to request an API/feature).

billti commented 1 year ago

Lots of fun debate on this one. I think we still need to 'triage' further to come to agreement.

filipw commented 1 year ago

I vote for a compatibility layer (for missing library functions)

swernli commented 11 months ago

The @Unimplemented attribute was added to the language to help provide guidance on this, but does not allow for adding any extra text to the error. After discussion with @DmitryVasilevsky we landed at wanting support for an optional string that gets added to the error output. I'll work on that, and that should enable any additional libraries we want to add with guidance for users on what to use.

swernli commented 10 months ago

Diggin into this further, we hit some complications:

Given that, the updated behavior we want for this doesn't seem reasonable to squeeze into 2401, so I'll remove the milestone tag.