From a503b7228593600ad2e6f3c12904cb8259f6ac72 Mon Sep 17 00:00:00 2001 From: "bela.vandervoort" Date: Sun, 10 Dec 2023 12:00:00 -0600 Subject: [PATCH] Releasing 0.26.5 --- CHANGELOG.md | 77 +++++++++++++++++++++- Nuget/Build.props | 2 +- Shell/ReviewBranch.psm1 | 2 +- Src/Website/docs/EditorsTroubleshooting.md | 18 ++--- 4 files changed, 87 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 288ba4198..e1f003ef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,78 @@ -# 0.26.4 +# 0.26.5 +## What's Changed +### 0.26.4 sorts `NSubstitute` before `Newtonsoft.Json` [#1061](https://github.com/belav/csharpier/issues/1061) +The using sorting in `0.26.4` was taking into account case. + +```c# +// 0.26.4 +using System; +using NSubstitute; +using Newtonsoft.Json; + +// 0.26.5 +using System; +using Newtonsoft.Json; +using NSubstitute; +``` + +Thanks go to @loraderon for contributing the fix. + +### Extra newline added when using a collection expression with { get; } [#1063](https://github.com/belav/csharpier/issues/1063) +A collection expression in a property initializer was including an extra new line. +```c# +// 0.26.4 +public class ClassName +{ + public List DaysOfWeek { get; } = + + [ + DayOfWeek.Sunday, + // snip + DayOfWeek.Saturday + ]; +} + +// 0.26.5 +public class ClassName +{ + public List DaysOfWeek { get; } = + [ + DayOfWeek.Sunday, + // snip + DayOfWeek.Saturday + ]; +} +``` +Thanks go to @SapiensAnatis for contributing the fix. + +### Comments at the end of a collection expression should be indented [#1059](https://github.com/belav/csharpier/issues/1059) +When the close bracket on a collection expression had a leading comment, it had the same indentation as the bracket. +```c# +// 0.26.4 +host.AddSection( + name: "Kontakt Libraries (Third Party)", + tags: Tags.SamplesUsed, + tasks: + [ + // TODO: Add any used third party instruments below as you discover them. + ] +); + +// 0.26.5 +host.AddSection( + name: "Kontakt Libraries (Third Party)", + tags: Tags.SamplesUsed, + tasks: + [ + // TODO: Add any used third party instruments below as you discover them. + ] +); +``` + +Thanks go to @fgimian for reporting the problem + +**Full Changelog**: https://github.com/belav/csharpier/compare/0.26.4...0.26.5 +# 0.26.4 ## What's Changed ### Spacing bugs related to C#12 collection expressions [#1049](https://github.com/belav/csharpier/issues/1049) [#1047](https://github.com/belav/csharpier/issues/1047) There were a number of cases where CSharpier was including extra blank lines, an extra space, or not formatting contents of collection expressions. @@ -1637,3 +1711,4 @@ Thanks go to @pingzing + diff --git a/Nuget/Build.props b/Nuget/Build.props index 9f533acec..ef251265f 100644 --- a/Nuget/Build.props +++ b/Nuget/Build.props @@ -1,6 +1,6 @@ - 0.26.4 + 0.26.5 MIT https://github.com/belav/csharpier git diff --git a/Shell/ReviewBranch.psm1 b/Shell/ReviewBranch.psm1 index 8400694ed..24a8df042 100644 --- a/Shell/ReviewBranch.psm1 +++ b/Shell/ReviewBranch.psm1 @@ -108,7 +108,7 @@ function CSH-ReviewBranch { if ($firstRun) { # uses https://github.com/github/hub/releases # if this hangs run a command against this repo outside of here, it will store - # a token. Or I can just have a way to pass a GITHUB_TOKEN or store it in a .env + # a token. Or I can just have a way to pass a GITHUB_TOKEN or store it in a .envc $newPr = & hub pull-request -b belav:$preBranch -m "Testing $branch $folder" Write-Output $newPr } diff --git a/Src/Website/docs/EditorsTroubleshooting.md b/Src/Website/docs/EditorsTroubleshooting.md index 63e4984a9..9dd71b434 100644 --- a/Src/Website/docs/EditorsTroubleshooting.md +++ b/Src/Website/docs/EditorsTroubleshooting.md @@ -3,8 +3,8 @@ title: Troubleshooting hide_table_of_contents: true --- -The editor extensions run CSharpier to facilitate format files. -CSharpier is kept running to speed up formatting results. +The editor extensions run CSharpier to facilitate format files. +CSharpier is kept running to speed up formatting results. The extensions install CSharpier to a custom path to avoid commands like `dotnet tool update -g csharpier` failing because a CSharpier is running. When the extension is unable to format files, it is generally a problem with being unable to install or execute the extension. You can use the information from the logs it outputs to understand the failure and then attempt the troubleshooting steps below. @@ -15,12 +15,12 @@ When the extension is unable to format files, it is generally a problem with bei - Change `Log Debug Messages` to `true` ### VSCode -- Navigate to `File - Preferences - Settings - Extensions - CSharpier` +- Navigate to `File - Preferences - Settings - Extensions - CSharpier` - Check `Enable debug logs` - Restart VSCode ### Rider -- Execute the action `Debug Log Settings` +- Execute the action `Debug Log Settings` - Add an entry for `#com.intellij.csharpier.CSharpierLogger` - Restart Rider @@ -41,12 +41,12 @@ When the extension is unable to format files, it is generally a problem with bei The following can help track down issues with the extension being unable to install/run CSharpier 1. Validate the following command can run in the directory of your project
-`dotnet csharpier --version` + `dotnet csharpier --version` 2. If the extension was able to install CSharpier it should exist at a path such as
-`C:\Users\[UserName]\AppData\Local\CSharpier\[CSharpierVersion]` or
-`$Home/.cache/csharpier/[CSharpierVersion]` + `C:\Users\[UserName]\AppData\Local\CSharpier\[CSharpierVersion]` or
+ `$Home/.cache/csharpier/[CSharpierVersion]` 3. Assuming the directory above exists, attempt to run the following in that directory
-`dotnet-csharpier --version` + `dotnet-csharpier --version` 4. If the installation appears to be corrupt, delete the directory and install CSharpier there yourself
-`dotnet tool install csharpier --version [CSharpierVersion] --tool-path [PathFromStep2]` + `dotnet tool install csharpier --version [CSharpierVersion] --tool-path [PathFromStep2]` 5. Repeat step 3 to validate the install