-
Notifications
You must be signed in to change notification settings - Fork 3
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
formatting races with rustc, causing compile errors to have wrong locations #9
Closed
Comments
Thank you for filing the issue! I encountered the issue very sporadically but didn't get around to debug it. Would you'd like to create a PR? Otherwise I'll do it in a few hours. Note that a failure to format should only emit a warning, and not break compilation |
drahnr
added a commit
that referenced
this issue
Mar 2, 2024
Merged
@programmerjake could you give #10 a spin, it does work for me. If I don't hear back from you by Monday, I'll cut a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when using
Expander::fmt
, rustc often reads the generated file beforerustfmt
has finished running, causing the compile errors to be based on the unformatted code, making the locations not match the formatted code.This is because
expand_to_file
usesCommand::spawn
instead ofCommand::status
or similar and doesn't wait forrustfmt
to finish before returning.The text was updated successfully, but these errors were encountered: