Skip to content

lang: allow cfg_attr for the ix data structs#2963

Closed
skrrb wants to merge 2 commits intosolana-foundation:masterfrom
skrrb:syn/cfg-attr
Closed

lang: allow cfg_attr for the ix data structs#2963
skrrb wants to merge 2 commits intosolana-foundation:masterfrom
skrrb:syn/cfg-attr

Conversation

@skrrb
Copy link
Copy Markdown
Contributor

@skrrb skrrb commented May 12, 2024

allow to conditionally include attributes in the autogenerated instruction data structures

related to #2339

@vercel
Copy link
Copy Markdown

vercel bot commented May 12, 2024

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

A member of the Team first needs to authorize it.

@skrrb skrrb marked this pull request as ready for review May 12, 2024 21:50
@acheroncrypto acheroncrypto added lang next Required for the next release labels May 13, 2024
@Aursen
Copy link
Copy Markdown
Collaborator

Aursen commented Aug 30, 2024

@acheroncrypto do I close my PR about it?

@acheroncrypto
Copy link
Copy Markdown
Collaborator

#2339 is about cfg while this PR is about cfg_attr, so I don't think you need to close it.

The reason why this PR is not merged yet is because we're trying to support invalid Rust code by using conditional derives with functions. We then have to remove this attribute from the function (because it wouldn't compile) by mutating the user's program module. Although this mutation seems fine, I'm not a fan of the nature of this code.

It would be great if we could find a better way to achieve this.

@jamie-osec
Copy link
Copy Markdown
Collaborator

We're cleaning up the repo and closing old PRs that may no longer be relevant. If you'd like to push this forward please open an issue with the feature request

@jamie-osec jamie-osec closed this Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang next Required for the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants