Skip to content

Fix "align" repr support in declare_program!#3056

Merged
acheroncrypto merged 10 commits into
otter-sec:masterfrom
0xBurbo:master
Jul 1, 2024
Merged

Fix "align" repr support in declare_program!#3056
acheroncrypto merged 10 commits into
otter-sec:masterfrom
0xBurbo:master

Conversation

@0xBurbo

@0xBurbo 0xBurbo commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

Problem: During declare_program Current code generates token stream that writes account representation alignment including the integer suffix: "#[align(8usize)]". This breaks compilation, and should look like "#[align(8)]"

This commit uses a proc_macro2 literal without the integer suffix to resolve the issue.

@vercel

vercel Bot commented Jun 26, 2024

Copy link
Copy Markdown

@0xBurbo is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added lang fix Bug fix PR labels Jun 27, 2024

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Could you note this fix in the CHANGELOG?

Comment thread lang/attribute/program/src/declare_program/common.rs Outdated
@0xBurbo

0xBurbo commented Jul 1, 2024

Copy link
Copy Markdown
Contributor Author

Changelog has been updated

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@acheroncrypto acheroncrypto merged commit e68b96f into otter-sec:master Jul 1, 2024
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
Co-authored-by: acheron <98934430+acheroncrypto@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix PR lang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants