-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
Improving error message for invalid file types #4216
Conversation
I'm not convinced the second part of the hint ("Check if you meant to add |
I believe the rationale for this is in the original issue, where you may accidentally (for example) use tab autocomplete towards a previously generated PDF file with the same name instead of the source file. With that said, it could be removed for the case without an extension, or even kept just for |
The compiler will now only suggest adding .typ if the .typ file exists. @MDLC01 thanks for your input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the implementation could still be simplified a bit, I've left a few comments to that effect.
I now also saw why the Hint<T> for SourceResult<T>
impl wasn't in place yet, but I think with a few other changes I proposed, it won't be needed anymore anyway. Sorry for sending you down the wrong path with this!
Thank you! |
Closes #2486
Refactored code for loading main source file with utf-8 error detection, providing a helpful message. See examples below: