-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
incr.comp.: We don't achieve 100% CGU re-use when recompiling Stylo #48184
Comments
Adding There are multiple (derive) proc macros in use, but they should be deterministic as far as I know. |
Thanks for the information, @SimonSapin! |
One way to find out if this is due to a |
I suspect it is because of hashset ordering in impl<'input, 'path> WhereClause<'input, 'path> {
pub fn add_trait_bound(&mut self, ty: &Ty) {
let trait_path = self.trait_path;
let params = self.params;
let mut found = self.trait_output.map(|_| HashSet::new()); .. later: if let Some(found) = found {
for ident in found {
let ty = Ty::Path(None, ident.into()); At least, this is responsible for causing differences in the |
@goffrie Wow, great find! That surely would explain instabilities. @SimonSapin What would you suggest that we do with the benchmark? Do newer versions of |
https://github.com/servo/servo/blob/master/components/style_derive/cg.rs now doesn’t use use We can update the entire benchmark to current Servo, but maybe it’s undesirable to change what’s being measured too much? Another option is patching the benchmark to replace |
I'd say let's patch the benchmark. One thing to look out for is if the values of pointers are being hashed (or compared in the case of BTreeSet). The version of syn being used seems to be an old one so I didn't see immediately if that could be the case. |
looks like it is possible to close this |
We should verify that we get 100% re-use first. |
This comment has been minimized.
This comment has been minimized.
I'm wondering why these CGUs are not named? Are you sure that this is an incr. build? You could try running the test again with |
Doh! I forgot to pass |
The following CGU are re-compiled even though there's been no change to the source code (just
touch components/style/lib.rs
).Version of Stylo used: https://github.com/rust-lang-nursery/rustc-perf/tree/6b3404678be0c1e3c013ca9234083984ae13b101/collector/benchmarks/style-2f3bc0de49
Steps to reproduce:
Need to investigate further why these CGUs are being recompiled? @SimonSapin, @emilio, is there maybe some kind of build script or proc-macro that modifies the source code during a rebuild?
The text was updated successfully, but these errors were encountered: