-
Notifications
You must be signed in to change notification settings - Fork 269
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
Derive macro MontConfig
panics if any other attribute is applied
#704
Labels
T-bug
Type: bug
Comments
You're right, this is a potentially desirable feature. I'm not aware of any way of doing directly what you're proposing.
I hope this helps! |
aleasims
added a commit
to aleasims/algebra
that referenced
this issue
Jan 11, 2024
Previously fetching function was panicing on every different attribute. Now it simply skips attributes of different format. As a result, it is possible now to apply other attributes when defining strucutre with MontConfig. Original issue is arkworks-rs#704
6 tasks
aleasims
added a commit
to aleasims/algebra
that referenced
this issue
Jan 11, 2024
@mmagician Thanks for your answer! I've come up with a possible fix for this issue, including changes in |
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 11, 2024
* Fix fetching attributes in MontConfig macro Previously fetching function was panicing on every different attribute. Now it simply skips attributes of different format. As a result, it is possible now to apply other attributes when defining strucutre with MontConfig. Original issue is #704 * Update CHANGELOG after fixing bug #704
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I'm trying to apply any additional attributes to structure with
#[derive(MontConfig)]
, it results in a panic:E.g in case I want my config structure depend on some feature, I can't compile something like:
As far as I understood, the problem is in
ark_ff_macros::fetch_attr
function, which rejects any meta exceptsyn::Meta::NameValue
. That's why attribute#[cfg(feature = "some_feature_name")]
leads to a panic.Is there any reason, why you disallow other attributes for
MontConfig
structures?The text was updated successfully, but these errors were encountered: