-
Notifications
You must be signed in to change notification settings - Fork 446
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
[Super errors] Remove dependency on Format for the code frame display #5013
Conversation
This is a mostly feature-compatible refactor of super_misc, which is used to display the code frame in super errors reporting. I've optimized, and added useless features, to keep the tests mostly still intact so that this can be merged more comfortably. After this gets merged, I'll clean up some more logic. Changes: - No more Format. - No more need to patch compiler for colors (will do this in the next diffs). - Less need to understand the intricacies of coloring. It's now mostly encapsulate within this module.
If you are sure of no regressions I am fine. Note the benefit is unclear since Format is heavily used in the compiler codebase which seems impossible to be eliminated |
Yeah I'm not trying to eliminate Format for the sake of it. Just that it'll reduce some maintenance burden all around since this doesn't need compiler patches and other copy pasting concerns for the syntax repo anymore. Regarding regressions: the tests have a decent coverage, though I couldn't find an error from us that needs recursive error reporting. |
This is technically a small bug from way back. The recent refactor rescript-lang#5013 allowed us to fix this.
This is technically a small bug from way back. The recent refactor #5013 allowed us to fix this.
Fixes part of rescript-lang/rescript-vscode#86 Previous to rescript-lang#5013 we couldn't fix this issue because we used Format to break lines for us. Now that we're controlling this manually, we can draw the gutter for those lines.
Fixes part of rescript-lang/rescript-vscode#86 Previous to #5013 we couldn't fix this issue because we used Format to break lines for us. Now that we're controlling this manually, we can draw the gutter for those lines.
[Super errors] Remove dependency on Format for the code frame display
This is a mostly feature-compatible refactor of super_misc, which is used to display the code frame in super errors reporting. I've optimized, and added useless features, to keep the tests mostly still intact so that this can be merged more comfortably. After this gets merged, I'll clean up some more logic.
Changes: