fix: Replace quote! with quote_spanned! in #[program] macro#4032
fix: Replace quote! with quote_spanned! in #[program] macro#4032AvhiMaz wants to merge 5 commits intosolana-foundation:masterfrom
Conversation
|
@AvhiMaz is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
4281950 to
0f32682
Compare
|
Please note that |
yaa true, i actually put quote_spanned in every file so I have gone through files and kept quote_spanned where it actually helps:
removed it from the scaffolding stuff:
should fix the issue now. |
e8e4c9a to
1e9fe84
Compare
There was a problem hiding this comment.
could you please make changes for cli's saftey checks?
- can you keep this issue (#3915) in mind so that changes should solve that issue too?
- can you also implement some tests to showcase the working? also I would recommend to add a CI workflow constrains to prove the changes are working as needed.
|
instead of pointing out to both vs |
|
Closes #3915 as well |
make sense, gotcha! i will update the implementation to point directly to the problematic field instead. |
|
While you're making changes, please address the earlier issues I raised with |
jamie-osec
left a comment
There was a problem hiding this comment.
Also LGTM - would you mind squashing your changes into one commit so git history is a little cleaner? Thank you!
26cd733 to
6d2c957
Compare
done! |
fe95928 to
6d2c957
Compare
|
@AvhiMaz can you makesure all tests should be passed |
yaa checking |
|
hi @Otter-0x4ka5h, can you please trigger the CI again? hopefully, all test cases pass this time. |
|
done, thanks ! |
0x4ka5h
left a comment
There was a problem hiding this comment.
lgtm @jamie-osec but i'm not sure by using Span::call_site()
I used what i thought if we use mixed_site() or def_site() would point inside the macro definition, which wouldn't be as helpful for end users, lmk if you'd prefer a different approach |
|
If you can address the latest comment and fix the merge conflicts this should be good to land |
f4b03b3 to
266da38
Compare
done |
266da38 to
e6c666b
Compare
…tter error messages Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
e6c666b to
00c41d2
Compare
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Replaces all uses of quote!{} with quote_spanned! in the program macro
code generation to ensure generated code corresponds to correct source
code locations. This enables the Rust compiler to report error messages
at the actual problematic code instead of the macro invocation.
Changes:
This addresses the requirements from issue #4015.