Cargo workspace support#431
Conversation
70533de to
d96f9d4
Compare
|
Now with basic tests. The feedback i would love to hear is:
|
|
My gut reaction is that if you want
I don't think |
|
Thank you for taking a look!
I'm sorry, i'm not quite following. By fuzz workspace, what exactly do you mean? The terms are a bit overloaded. And now i want to add fuzzing for each one of them.
How do i build all fuzz targets in all projects in this workflow?
Err, this feedback is a bit unactionable. I don't quite understand why this is unacceptable behaviour. |
|
(just to be explicit: this is not about different workspaces, this is about supporting different projects within a single cargo workspace. Whether or not the |
|
Hi. Is there perhaps a better place to have a disscussion about this? I don't claim the diff as is to be the final correct approach, This change didn't come out of boredom, |
98d960d to
d9f273f
Compare
|
I've spent some more thought on this, and ended up completely ripping out Does this look more reasonable? :) Any other suggestions? |
|
@fitzgen kindly, poke |
|
IMO workspaces are supported just fine today (you can put multiple fuzz crates in a workspace or have them in their own workspace if you prefer) and I think making the search for the fuzz crate to operate upon more complicated isn't really worth it (today's algorithm of either taking an explicit path or walking up towards the root from the current dir is in a pretty sweet spot where it is both simple and effective). |
|
Thanks for taking a look!
Perhaps there is a miscommunication going on here.
|
|
@rust-fuzz @fitzgen @Manishearth who "owns" this project?
(I think this clearly states that cargo workspaces aren't supported by the current design...) |
|
Ping. This isn't really inventing anything new, this is roughtly how it's done by other cargo subcommand transplants. |
d9f273f to
e99249e
Compare
|
Gentle poke, thank you. |
|
I'm really struggling to understand the problems you are trying to solve here. I think more concrete examples and saying precisely what you expect to work might help. I have spent ten minutes looking at this thread and I do not understand what you have been trying to say, and I do not really have the time or motivation to engage in depth here.
I don't actually think this is a property we particularly care about? |
Currently,
cargo-fuzzimplements manual parser forCargo.toml,which means that only a very specific project structure is supported.
Namely, this only supports either one of:
"<workspace root>"/fuzz... where "" is found arbitrairly.
My biggest problem with this, is that if i want to have
a workspace-style layout for
fuzzproject,i.e.
/fuzz/Cargo.tomlisn't a project,but
/fuzz/foo/Cargo.tomland/fuzz/bar/Cargo.tomlare,current cargo-fuzz simply doesn't support this.
The overall solution is to stop parsing
Cargo.tomlmanually,and rely on
cargo metadata, via existingcargo-metadatadep.I've tried very hard to preserve existing functionality,
but i'm not sure how good the test coverage is.
Now, let's mention fuzz artifact dirs location (
corpus, etc).Currently, they will still all be located in
<workspace root>,but with a caveat: if the
<workspace root>/fuzzis part of
<workspace root>project,then they will no longer be stored in
fuzzsubdirectory.Additonally, i'm wondering if this is the right default anyway,
should they be stored in,
<fuzz project root>of each target?Incindentally, this would restore the previous default.
Thoughts?
Fixes #430.