Skip to content

Differential typeToString / smarter error truncation #42597

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

Open
DanielRosenwasser opened this issue Feb 2, 2021 · 0 comments
Open

Differential typeToString / smarter error truncation #42597

DanielRosenwasser opened this issue Feb 2, 2021 · 0 comments
Assignees
Labels
Domain: Error Messages The issue relates to error messaging Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info Experience Enhancement Noncontroversial enhancements Experimentation Needed Someone needs to try this out to see what happens

Comments

@DanielRosenwasser
Copy link
Member

Lots of the time, error truncation will kick in at the most inopportune time, and lose relevant properties that will be subsequently elaborated on. @RyanCavanaugh has been thinking about a smarter version of this where we can inform our string writers to be a little smarter and not throw away the relevant members of a union, or properties of an object.

But there are some areas that we need to kind of think through and be wary of.

  1. don't repeat yourself: if you end up repeating a constituent of a union on the next line, then was it the best thing to focus on that part of the union on the prior line? You might avoid surprising a user ("where'd that type come from!?") but you're potentially not gaining anything. This leads us to
  2. don't lose the right information: error messages don't always go down the most-appropriate path. If we try to over-focus on the types that the error decided to elaborate on, we shouldn't lose relevant information from other possible types.
@DanielRosenwasser DanielRosenwasser added Domain: Error Messages The issue relates to error messaging Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info Experimentation Needed Someone needs to try this out to see what happens labels Feb 2, 2021
@DanielRosenwasser DanielRosenwasser added the Experience Enhancement Noncontroversial enhancements label Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Error Messages The issue relates to error messaging Domain: Type Display Bugs relating to showing types in Quick Info/Tooltips, Signature Help, or Completion Info Experience Enhancement Noncontroversial enhancements Experimentation Needed Someone needs to try this out to see what happens
Projects
None yet
Development

No branches or pull requests

2 participants