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

doesn't work with dotnet-format v5.0.211103 #174

Open
Guria opened this issue Apr 7, 2021 · 3 comments
Open

doesn't work with dotnet-format v5.0.211103 #174

Guria opened this issue Apr 7, 2021 · 3 comments

Comments

@Guria
Copy link

Guria commented Apr 7, 2021

Run xt0rted/dotnet-format@v1
  with:
    repo-token: ***
    action: check
    fail-fast: true
  env:
    DOTNET_ROOT: /home/runner/.dotnet
/home/runner/.dotnet/dotnet format --check --dry-run
  The file '--dry-run' does not appear to be a valid project or solution file.
Error: Formatting issues found

https://github.com/dotnet/format#new-in-v50211103

@Guria Guria changed the title doesn't work with dotnet-format 5.x doesn't work with dotnet-format v5.0.211103 Apr 7, 2021
@xt0rted
Copy link
Owner

xt0rted commented Apr 13, 2021

There were a couple breaking changes in v4 and v5. I started working on an update for this but haven't had the time to finish it. I'm hoping to spend some time over the next week or two on this since it's a blocker for my projects now as well.

@ceberttylertech
Copy link

@xt0rted are you open to contributions for this issue or would you rather do it yourself?

@xt0rted
Copy link
Owner

xt0rted commented Jun 3, 2021

@ceberttylertech this work turned into a much larger project than I expected due to issues with dotnet format as well as some personal things that have been holding me up.

The work is pretty much done. #194 adds support for v4 and I have a version for v5 & v6 previews that's waiting for that PR to be merged. The reason it hasn't been merged yet is:

  1. dotnet format is throwing exceptions in some versions on macOS but not on other platforms.
  2. The results don't match between platforms so the output may show issues on one platform but not on the others.
  3. Regressions between versions where issues aren't reported in newer versions that were in older versions. This may be due to the new parameters you can pass in but I haven't been able to confirm.
  4. Passing arguments to dotnet format with @actions/exec doesn't work with v4 or v5 the same as it did with v3 or as it does on the command line (the same is true for other libraries including sindresorhus/execa) so dotnet format ends up not running as you intended or it simply errors out in some cases.

I was testing a workaround for passing the arguments in and that seems to be working now but I still need to open an issue in dotnet/format with all of my findings and make sure what I'm doing is correct. I'm going to try and put this together over the weekend so more progress can be made here.

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

No branches or pull requests

3 participants