-
Notifications
You must be signed in to change notification settings - Fork 575
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
Add a flag to print generated locations. #7187
Conversation
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-filesystem/src/db.rs
line 352 at r1 (raw file):
/// Returns the location of the originating user code. pub fn get_originating_location(
maybe move this check to the call site?
this sound like it would happen everywhere in the language server.
Code quote:
get_originating_location
Previously, orizi wrote…
DiagnosticLocation::user_location? do you know what is the first place that is used by the compiler but not the language server? |
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-filesystem/src/db.rs
line 352 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
DiagnosticLocation::user_location?
do you know what is the first place that is used by the compiler but not the language server?
seems like it at least does not rely on diagnostics.
7f0f2db
to
92c0bb9
Compare
Previously, orizi wrote…
I've decide to add it as a note |
Previously, ilyalesokhin-starkware wrote…
Code snippet: error: Plugin diagnostic: Closing `}` without a matching `{`.
--> lib.cairo:2:8
panic!("bad_format(})")
^^^^^^^^^^^^^^^
note: The error originates from the generated code in lib.cairo[panic_macro]:4:47
write!(__formatter_for_panic_macro__, "bad_format(})")
^^^^^^^^^^^^^^^
|
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.
Reviewed 2 of 2 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-diagnostics/src/diagnostics.rs
line 326 at r2 (raw file):
diag_location.user_location_with_plugin_notes(files_db, file_notes); let print_generated_location = diag_location != user_location
Suggestion:
let include_generated_location = diag_location != user_location
92c0bb9
to
824dbcb
Compare
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)
No description provided.