Skip to content
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

Run format check in our CI and fix repo format #205

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

celinval
Copy link

@celinval celinval commented Dec 4, 2024

Changed the check-rustc.sh script to run the format check. Also added a --bless mode to apply the changes locally.
This change also includes the result of running the script with the --bless mode on.

Related to #38

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@celinval celinval requested a review from a team as a code owner December 4, 2024 01:22
Copy link

@zhassan-aws zhassan-aws left a comment

Choose a reason for hiding this comment

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

Awesome! What does the error look like when the formatting check fails?

scripts/check_rustc.sh Outdated Show resolved Hide resolved
@celinval
Copy link
Author

celinval commented Dec 4, 2024

Awesome! What does the error look like when the formatting check fails?

It will contain the diff of the files in the temporary folder, like any rustfmt failure.

Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
@celinval
Copy link
Author

celinval commented Dec 4, 2024

I'll solve the merge conflicts after the second review

@zhassan-aws
Copy link

Awesome! What does the error look like when the formatting check fails?

It will contain the diff of the files in the temporary folder, like any rustfmt failure.

When it fails, would it be possible for the script to print the command the user should run to format the code?

@tautschnig
Copy link
Member

I'll solve the merge conflicts after the second review

I’ll re-approve once conflicts are resolved.

@celinval
Copy link
Author

celinval commented Dec 5, 2024

Awesome! What does the error look like when the formatting check fails?

It will contain the diff of the files in the temporary folder, like any rustfmt failure.

When it fails, would it be possible for the script to print the command the user should run to format the code?

Sure... I can do that

@carolynzech carolynzech assigned carolynzech and unassigned celinval Dec 11, 2024
@carolynzech carolynzech marked this pull request as draft December 13, 2024 01:50
@carolynzech
Copy link

carolynzech commented Dec 13, 2024

Putting this PR in draft for now. I don't know what's causing the workflow failures. The failure in 03855ef
for MacOS (about --suffix) I already fixed in dd870e5, but dd870e5's workflow still fails with a bootstrapping error. I can't reproduce that issue locally because my laptop crashes with this error:

panic(cpu 8 caller 0xfffffe0028663d1c): Mutex 0xfffffe1fffe29740 is unexpectedly owned by thread 0xfffffe24dd4f4fd0 @lock_mtx.c:175

before it gets there. (By crashes, I mean my computer reboots--this is a MacOS kernel failure, not a nicely handled script error.) I need to investigate more.

For now, I did update the repo with the result of running ./x fmt, since the script runs fine locally if I use dd870e5 and exit before running ./x test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants