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

Add dotnet format #468

Merged
merged 15 commits into from
Nov 9, 2023
Merged

Add dotnet format #468

merged 15 commits into from
Nov 9, 2023

Conversation

TylerJang27
Copy link
Collaborator

@TylerJang27 TylerJang27 commented Sep 7, 2023

Add dotnet-format, which is run from dotnet. Some downloads are provided via Microsoft, but not in an easy templatizable format.

This formatter does not work on Mac M1 for unknown reasons. The first run it appears to sometimes spawn a zombie process that we can't terminate from, causing Trunk to hang. I've disabled the M1 download for that reason until we can figure out a fix.

This will require a minor version bump since we bump the required trunk version.

As a side note, dotnet-format sometimes leaves around other file artifacts as a result of its run, but I believe this is expected behavior within the dotnet ecosystem and these should appropriately be git-ignored.

@TylerJang27 TylerJang27 changed the title DRAFT: Dotnet format with new run_from syntax Dotnet format with new run_from syntax Sep 14, 2023
@TylerJang27 TylerJang27 changed the base branch from main to tyler/new-run-from September 14, 2023 20:14
Base automatically changed from tyler/new-run-from to main September 14, 2023 23:22
@EliSchleifer
Copy link
Member

@TylerJang27 - is this waiting on anything now?

@TylerJang27
Copy link
Collaborator Author

@TylerJang27 - is this waiting on anything now?

This works on all platforms except for M1 Mac, where it hangs for unknown reasons (and only on first run). I've been doing an ongoing investigation whenever I have free cycles. I've relayed this to the original user who requested this as well (who uses an M1 Mac).

@TylerJang27 TylerJang27 changed the title Dotnet format with new run_from syntax New formatter dotnet format Nov 8, 2023
@TylerJang27 TylerJang27 changed the title New formatter dotnet format Add dotnet format Nov 8, 2023
@TylerJang27 TylerJang27 marked this pull request as ready for review November 9, 2023 00:08
@TylerJang27 TylerJang27 merged commit 419e8e3 into main Nov 9, 2023
14 checks passed
@TylerJang27 TylerJang27 deleted the tyler/dotnet-format branch November 9, 2023 00:13
pat-trunk-io pushed a commit that referenced this pull request Jan 22, 2024
Add [dotnet-format](https://github.com/dotnet/format/tree/main), which
is run from
[dotnet](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format).
Some downloads are provided via
[Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet/7.0), but
not in an easy templatizable format.

This formatter does not work on Mac M1 for unknown reasons. The first
run it appears to _sometimes_ spawn a zombie process that we can't
terminate from, causing Trunk to hang. I've disabled the M1 download for
that reason until we can figure out a fix.

This will require a minor version bump since we bump the required trunk
version.

As a side note, dotnet-format sometimes leaves around other file
artifacts as a result of its run, but I believe this is expected
behavior within the dotnet ecosystem and these should appropriately be
git-ignored.

---------

Co-authored-by: Soo Park <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants