-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Remove some dependencies #2730
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
Remove some dependencies #2730
Conversation
I approve these changes in |
It's somewhat surprising to me that changes in error-printing code would give such a large speedup in compile times. It's always welcome, of course, when speedups come -- but @bjorn3, do you have any sense of why this happens? I ask because it could be a symptom of something weirder going on behind the scenes -- for example, are we throwing a bunch of errors and doing work to capture backtraces but then silencing them somehow? All other things being equal, the auto-derived error handling is kind of nice, but I won't fight too hard for it if we win by doing something lighter-weight. |
I believe, because |
Ah -- to clarify, @bjorn3, you mean the compile time of cg_clif, not the time that cg_clif takes to compile code? (I was assuming the latter, and thus was quite confused about the impact of error-path code on the happy path!) |
Correct, I mean the time it takes to compile cg_clif itself. Sorry for the confusion.
Indeed. I try to avoid dependencies where possible and even use dependencies from the rustc-dev rustup component instead of crates.io where possible. |
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.
Looks good -- I definitely am in agreement with the idea that our core libraries should try not to pull too much in. (IIRC this has been stated as a goal at one time or another but the tendency is always to drift in the other direction...) Happy to merge once the conflicts are resolved.
Would you mind leaving a comment above the Display & Error impls that these are written by hand to avoid pulling in the |
Done |
Rebased |
This improves compilation time of cg_clif by 6s. For users of cranelift that don't already disable optimizations for syn and other dependencies of the thiserror proc macro, the release mode compilation time wins will be even larger.