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

Disable dotnet-format hook. Fixes #29768 #30145

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Feb 12, 2021

Although we are still interested in having a mechanism for this (#27632), we have realised that it's more complicated. The mechanism we merged before unfortunately has a series of problems which are having a negative effect on the development flow:

  1. It gets the wrong list of files to format. It formats those touched on your previous commit, not the current one, so it's highly unpredictable which files will get formatted. This can also result in additional files being committed even if they were not staged for commit.
  2. It doesn't have any handling for partially-staged files (dotnet-format breaks partial commits #29768). This can result in additional unwanted lines getting committed.
  3. It only sets up the hook inside build.cmd, and not in build.sh

Issue 3 could be fixed easily, and issue 1 is probably not too bad to resolve, but issue 2 is rather tricky.

Rather than continue to produce random effects on each commit, let's disable this until we're ready to merge a solid implementation.

@SteveSandersonMS SteveSandersonMS added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 12, 2021
@SteveSandersonMS SteveSandersonMS requested review from javiercn and a team February 12, 2021 15:28
@ShreyasJejurkar
Copy link
Contributor

In the latest release, there are some breaking changes as well in format tool!

The other thing that I wanted to mention here, the format seems slow, not sure if you guys are facing same issue, but I am having that issue, I thought it's because my machine issue, which works quite slow this days!

@SteveSandersonMS SteveSandersonMS merged commit fba1bcc into main Feb 12, 2021
@SteveSandersonMS SteveSandersonMS deleted the stevesa/disable-formatting-hook branch February 12, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants