-
Notifications
You must be signed in to change notification settings - Fork 540
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
LS: Add completions of struct members #6567
Conversation
c0c55cc
to
5000e10
Compare
aa6b402
to
eef5d39
Compare
eef5d39
to
dd6a947
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 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @integraledelebesgue, @mkaput, and @orizi)
crates/cairo-lang-language-server/tests/test_data/completions/structs.txt
line 25 at r1 (raw file):
x: 0x0, y: 0x0, z: 0x0
I guess missing here?
crates/cairo-lang-language-server/tests/test_data/completions/structs.txt
line 40 at r1 (raw file):
x: 0x0, <caret> ..s
To make sure it doesn't work in the second case
Suggestion:
<caret>
<caret>..s
dd6a947
to
2af0faf
Compare
4e09b88
to
3ee5101
Compare
2af0faf
to
477291d
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 4 of 4 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Arcticae, @Draggu, @integraledelebesgue, and @orizi)
crates/cairo-lang-language-server/tests/test_data/completions/structs.txt
line 47 at r1 (raw file):
mod happy_cases { use super::some_module::Struct;
please trim whitespace in empty lines
crates/cairo-lang-language-server/tests/test_data/completions/structs.txt
line 62 at r1 (raw file):
x: 0x0, <caret> }
consider putting all of these in single line so that source line contexts will make sense
Suggestion:
let a = Struct { <caret> };
let b = Struct { y: 0x0, <caret> };
let c = Struct { y: 0x0, x: 0x0, <caret> }
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, 3 unresolved discussions (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
crates/cairo-lang-language-server/tests/test_data/completions/structs.txt
line 25 at r1 (raw file):
Previously, piotmag769 (Piotr Magiera) wrote…
I guess missing here?
This struct is instantiated only to be used below in a "tail": ..s
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 r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @integraledelebesgue, and @orizi)
477291d
to
3bfc1c2
Compare
3ee5101
to
29fe64f
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.
Reviewable status: 2 of 4 files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @mkaput, @orizi, and @piotmag769)
crates/cairo-lang-language-server/tests/test_data/completions/structs.txt
line 62 at r1 (raw file):
Previously, mkaput (Marek Kaput) wrote…
consider putting all of these in single line so that source line contexts will make sense
Done.
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: 2 of 4 files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @mkaput, @orizi, and @piotmag769)
crates/cairo-lang-language-server/tests/test_data/completions/structs.txt
line 47 at r1 (raw file):
Previously, mkaput (Marek Kaput) wrote…
please trim whitespace in empty lines
Done.
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 r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae, @Draggu, and @orizi)
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 r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae, @Draggu, and @orizi)
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 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae and @Draggu)
ed3b2f8
to
b329f4c
Compare
b329f4c
to
bb0ac19
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 4 files at r1, 1 of 1 files at r2, 2 of 2 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae)
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: complete! all files reviewed, all discussions resolved (waiting on @Arcticae)
241d4c0
to
e8f66e9
Compare
030cc39
to
ef74001
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 2 of 2 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae)
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 2 files at r5.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae and @integraledelebesgue)
crates/cairo-lang-language-server/src/ide/completion/completions.rs
line 363 at r5 (raw file):
let struct_members = concrete_struct_members(db, constructor_semantic_expr.concrete_struct_id).ok()?;
This is a query, use it as one
Suggestion:
db.concrete_struct_members(constructor_semantic_expr.concrete_struct_id)
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 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae and @integraledelebesgue)
ef74001
to
920e8b0
Compare
e8f66e9
to
ec9a093
Compare
920e8b0
to
f43dca8
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.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @Arcticae, @mkaput, and @piotmag769)
crates/cairo-lang-language-server/src/ide/completion/completions.rs
line 363 at r5 (raw file):
Previously, piotmag769 (Piotr Magiera) wrote…
This is a query, use it as one
Done
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 r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae)
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 r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae)
f43dca8
to
7a13d8e
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 r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae)
ec9a093
to
bf9abe3
Compare
7a13d8e
to
e0584da
Compare
commit-id:46f1dadf
commit-id:9fb1df2c
e0584da
to
464f6ea
Compare
Stack: