Skip to content
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

fix: Add support for const generics in types inside of accounts in declare_program #2965

Merged
merged 2 commits into from
May 14, 2024
Merged

Conversation

cryptopapi997
Copy link
Contributor

@cryptopapi997 cryptopapi997 commented May 13, 2024

Currently const generics are not supported by declare_program!.
Reason is two things:

  • Missing const keyword
  • Using format_ident! on a string w spaces and the : character leads to an invalid identifier, which panics with Invalid Identifier

This PR fixes this.

Copy link

vercel bot commented May 13, 2024

@cryptopapi997 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 May 13, 2024
Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Before we merge, could you note this fix in the CHANGELOG?

@acheroncrypto acheroncrypto added the next Required for the next release label May 13, 2024
@cryptopapi997 cryptopapi997 changed the title Add support for const generics in types inside of accounts fix: Add support for const generics in types inside of accounts in declare_program May 13, 2024
@cryptopapi997
Copy link
Contributor Author

cryptopapi997 commented May 13, 2024

Thanks for the quick response! Just added it. Also, while fixing this I found two other small bugs related to declare_program!, I've added PRs for them here:

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

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 460869b into coral-xyz:master May 14, 2024
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PR lang next Required for the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants