-
Notifications
You must be signed in to change notification settings - Fork 58
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
CodeMirror diagnostics only show one source range #5754
Labels
codemirror
Bugs related to code mirror.
Comments
adamchalmers
added a commit
that referenced
this issue
Mar 11, 2025
Fixes #4307 Now if you try to fillet the same edge twice in a single fillet command, the error message is clearer, and the source range will highlight the specific edges in the array which are duplicated. Same goes for chamfer. Note: although the Rust KCL interpreter sends back an array of SourceRange for each KCL error, the frontend only puts the first one into CodeMirror diagnostics. We should fix that: #5754
adamchalmers
added a commit
that referenced
this issue
Mar 11, 2025
Fixes #4307 Now if you try to fillet the same edge twice in a single fillet command, the error message is clearer, and the source range will highlight the specific edges in the array which are duplicated. Same goes for chamfer. Note: although the Rust KCL interpreter sends back an array of SourceRange for each KCL error, the frontend only puts the first one into CodeMirror diagnostics. We should fix that: #5754
adamchalmers
added a commit
that referenced
this issue
Mar 11, 2025
Fixes #4307 Now if you try to fillet the same edge twice in a single fillet command, the error message is clearer, and the source range will highlight the specific edges in the array which are duplicated. Same goes for chamfer. Note: although the Rust KCL interpreter sends back an array of SourceRange for each KCL error, the frontend only puts the first one into CodeMirror diagnostics. We should fix that: #5754
adamchalmers
added a commit
that referenced
this issue
Mar 11, 2025
Fixes #4307 Now if you try to fillet the same edge twice in a single fillet command, the error message is clearer, and the source range will highlight the specific edges in the array which are duplicated. Same goes for chamfer. Note: although the Rust KCL interpreter sends back an array of SourceRange for each KCL error, the frontend only puts the first one into CodeMirror diagnostics. We should fix that: #5754
adamchalmers
added a commit
that referenced
this issue
Mar 12, 2025
Fixes #4307 Now if you try to fillet the same edge twice in a single fillet command, the error message is clearer, and the source range will highlight the specific edges in the array which are duplicated. Same goes for chamfer. Note: although the Rust KCL interpreter sends back an array of SourceRange for each KCL error, the frontend only puts the first one into CodeMirror diagnostics. We should fix that: #5754
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rust sends back KCL errors to the frontend. Those KCL errors are converted to CodeMirror diagnostics and are visualized in the CM editor as red underlines/red error badges.
KCL errors have a vector (i.e. array) of source ranges associated with the error. However, CodeMirror diagnostics can only have one source range associated with them (see definition, it has a single
from
andto
field).It's sometimes useful to show all the KCL source ranges. For example, if the user tries to fillet the same edge multiple times, the Rust KCL interpreter sends back an error and the source range of every time the user tried to fillet that one edge. Users would find it easier to debug if this showed all places the edge was filletted, not just one arbitrarily-chosen one.
The text was updated successfully, but these errors were encountered: