Skip to content

do our best to emit macro output even in the face of errors#135

Merged
ahl merged 1 commit into
mainfrom
rust-analyzer
Oct 18, 2021
Merged

do our best to emit macro output even in the face of errors#135
ahl merged 1 commit into
mainfrom
rust-analyzer

Conversation

@ahl

@ahl ahl commented Oct 12, 2021

Copy link
Copy Markdown
Collaborator

closes #134

This restructures the #[endpoint .. ] macro so that it only fails in the case of some really busted input. Our goal is to do our level best to produce reasonable output in order to avoid confusing rust analyzer.

Note that this changed some of the error messages; I think these are largely improvements, but @davepacheco I'd love your opinion.

@jclulow if you're able to see if this resolves your issue that would be tremendously helpful. I played around on the latest RA, and while I was able to conjure up what you described, I'm not 100% convinced that this fixes it (i.e. and that perhaps I'm now just getting lucky).

@ahl ahl requested a review from davepacheco October 12, 2021 05:24
@jclulow

jclulow commented Oct 12, 2021

Copy link
Copy Markdown
Collaborator

Thanks, Adam! I will test this tomorrow (Tuesday).

this turns out to be important in order to not confuse rust-analyzer
@ahl

ahl commented Oct 12, 2021

Copy link
Copy Markdown
Collaborator Author

Thanks, Adam! I will test this tomorrow (Tuesday).

No rush. I'm not 100% about this approach; it may well be the wrong direction.

@davepacheco davepacheco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message diffs look fine to me. Thanks for doing this.

@jclulow

jclulow commented Oct 12, 2021

Copy link
Copy Markdown
Collaborator

After tinkering with it for a while, I have not been able to confuse RA in the way it could become confused before. This is obviously not a precise test, but it so far feels a lot less flaky to me. Thanks for doing this!

@ahl

ahl commented Oct 18, 2021

Copy link
Copy Markdown
Collaborator Author

Awesome! Thanks for taking it for a spin!

@ahl ahl merged commit decd0ff into main Oct 18, 2021
@ahl ahl deleted the rust-analyzer branch October 18, 2021 16:07
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 this pull request may close these issues.

rust-analyzer newly confused by endpoint macro

3 participants