-
Notifications
You must be signed in to change notification settings - Fork 110
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
Consider using a workspace instead of a fully separate crate #345
Comments
This has been there since before I started hacking on @Manishearth any idea? |
"interfering" is probably referring to this error you get if you remove the
so to make this part of the workspace, you'd have to also edit |
Yep. We can remove that if we also fix the workspace editing. We ought to. |
I agree that fuzzers should be part of the main workspace. Sharing the In addition to adding the
otherwise, |
Currently caching does not work for `fuzz` job which can be verified by looking at the Github workflow output. The main cause of the issue is the config `workspaces: fuzz -> target`. The fuzz target does not use a proper workspace but a separate crate. There is [a pending issue](rust-fuzz/cargo-fuzz#345) discussing that. The `rust-cache` action is executed in the root of the project and is not able to locate `fuzz` directory by workspace name. I decided to list the directories to cache instead of relying on target dir detection which seems to work. I also fixed the path `fuzz/corpus` to `i18n-helpers/fuzz/corpus`. I adjusted the caching condition `safe-if` to cache only on `main` builds. I think this makes sense because we don't need to cache PRs which might not get merged or get updated multiple times during review.
Currently caching does not work for `fuzz` job which can be verified by looking at Github workflow exec outputs. The main cause of the issue is the config `workspaces: fuzz -> target`. The fuzz target does not use a proper workspace but a separate crate. There is [a pending issue](rust-fuzz/cargo-fuzz#345) discussing that. The `rust-cache` action is executed in the root of the project and is not able to locate `fuzz` directory by workspace name. I decided to list the directories to cache instead of relying on target dir detection which seems to work. I also fixed the path `fuzz/corpus` to `i18n-helpers/fuzz/corpus`. I adjusted the caching condition `save-if` to cache only on `main` builds. I think this makes sense because we don't need to cache PRs which might not get merged or get updated multiple times during review.
Currently caching does not work for `fuzz` job which can be verified by looking at Github workflow exec outputs. The main cause of the issue is the config `workspaces: fuzz -> target`. The fuzz target does not use a proper workspace but a separate crate. There is [a pending issue](rust-fuzz/cargo-fuzz#345) discussing that. The `rust-cache` action is executed in the root of the project and is not able to locate `fuzz` directory by workspace name. I decided to list the directories to cache instead of relying on target dir detection which seems to work. I also fixed the path `fuzz/corpus` to `i18n-helpers/fuzz/corpus`. I adjusted the caching condition `save-if` to cache only on `main` builds. I think this makes sense because we don't need to cache PRs which might not get merged or get updated multiple times during review.
I believe this issue can be resolved now given that |
Right now,
cargo fuzz init
generates the following Cargo.toml:In particular, this puts all the fuzz targets in a separate workspace. I am not sure why that decision was made - it prevents reusing the build cache between the fuzzer and the rest of the code. It would be nice if they shared a workspace and therefore a cache.
I do see that this configures
profile.release
, so to avoid interfering with existing configs it could use a newprofile.fuzzing
or something like that.The text was updated successfully, but these errors were encountered: