Skip to content

nicer autodiff error handling #142842

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ZuseZ4
Copy link
Member

@ZuseZ4 ZuseZ4 commented Jun 21, 2025

I still intend to finish #137570 by adding proper handling for library builds.
I was hoping to directly get the proper fix in, but I haven't had the time in a while, and other contributors and early testers run into this issue often enough.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 21, 2025
@ZuseZ4 ZuseZ4 marked this pull request as ready for review June 25, 2025 17:06
@rustbot
Copy link
Collaborator

rustbot commented Jun 25, 2025

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 25, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@oli-obk
Copy link
Contributor

oli-obk commented Jun 25, 2025

Please give the commit a proper commit message 😆

@oli-obk oli-obk changed the title nicer error handling nicer autodiff error handling Jun 25, 2025
@ZuseZ4 ZuseZ4 force-pushed the autodiff-error-handling branch from acde7fc to f21fac3 Compare June 26, 2025 22:59
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Jun 26, 2025

cc @Sa4dUs that should prevent your issue in the future.

@ZuseZ4 ZuseZ4 force-pushed the autodiff-error-handling branch from f21fac3 to 5c4b6cc Compare June 27, 2025 00:06
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Jun 27, 2025

ok, I'm happy with these two tests, let me know if you want any changes.

@ZuseZ4 ZuseZ4 force-pushed the autodiff-error-handling branch from 5c4b6cc to 3610d7c Compare June 27, 2025 00:12
@@ -419,7 +419,12 @@ fn generate_lto_work<B: ExtraBackendMethods>(
} else {
if !autodiff.is_empty() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe pick a random (like the first) entry from this list and use its span so in case of a larger crate the user is aware of why this is being emitted. I could see it being confusing in case someone is adding cfgs to turn on/off autodiff and got sth wrong in the process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants