-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Multipart Input support #1617
Multipart Input support #1617
Conversation
61ab9e0
to
cf90042
Compare
What's the status here? |
Sorry, still needs some work. Lots going on right now 🙂 I'll try to address this in the upcoming days. |
29c2c84
to
1db7d0a
Compare
|
||
// without this, artificial bug is not found | ||
// maybe interesting to try to auto-derive this, researchers! :) | ||
count_set(count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to "cheat" here a little bit 😉
/// related, or represent distinct parts of the input. | ||
#[derive(Clone, Debug, Serialize, Deserialize)] | ||
pub struct MultipartInput<I> { | ||
parts: Vec<I>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also have an input consisting of multipe different inputs at some point (but then we're basically doing grammar fuzzing?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it is really hard (read: impossible) for me to do dynamic types like this. I tried, but it just didn't work because the type constraints on mutator eventually need a concrete type. Users will simply need to wrap MultipartInput<I1>
and MultipartInput<I2>
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we could do it the way we do Feedbacks, like, a MultiInput<I1, I2> and then a multiinput could have multiple multiinputs again (right?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is the mutators -- it is not possible (to my knowledge) to have generic implementations for these with diverse input types. With this support as is, though, it shouldn't be too hard to implement what you're suggesting on a case-by-case basis.
This offers a basic implementation for multipart inputs with consistent sub-input types.