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

Add path to PDA seeds parse #2699

Merged
merged 6 commits into from
Nov 15, 2023

Conversation

johnanthos
Copy link
Contributor

@johnanthos johnanthos commented Nov 13, 2023

Problem

When seeds are declared as constants, a warning is thrown when building.
The issue is thoroughly described at #2697

Summary of changes

  • Add Path as an option to seeds parsing
  • Deconstruct and parse as string literal

Notes

Likely more use cases besides parsing as string literal need to be covered under this Path scenario but I'd appreciate anyone else's input on that as I'm still not entirely familiar on all the possible use cases.
Also couldn't find tests for these use cases but maybe that should be a separate task.

Fixes

Fixes #2697

Copy link

vercel bot commented Nov 13, 2023

@johnanthos 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 bug Something isn't working idl related to the IDL, either program or client side labels Nov 13, 2023
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.

Also couldn't find tests for these use cases but maybe that should be a separate task.

Yes, it would be great to have tests for this in this PR. We have IDL related tests here if you'd like to add.

@johnanthos
Copy link
Contributor Author

@acheroncrypto a simple test added with a custom bash script to catch the warning from the described issue because it does not throw an error but just a warning message. Let me know if this makes sense or if the goal should be to change on the implementation side.

@acheroncrypto
Copy link
Collaborator

This looks great. Would you mind adding this fix to the CHANGELOG?

@johnanthos
Copy link
Contributor Author

This looks great. Would you mind adding this fix to the CHANGELOG?

Done @acheroncrypto

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 a9c423e into coral-xyz:master Nov 15, 2023
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working idl related to the IDL, either program or client side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seed string cannot be declared as constant when feature seed = true is used
2 participants