From 0912940de358eed122333d4ffcdde9b059f03888 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 08:02:44 +0000 Subject: [PATCH 1/6] build(deps): bump Microsoft.CodeAnalysis.Common from 4.5.0 to 4.6.0 Bumps [Microsoft.CodeAnalysis.Common](https://github.com/dotnet/roslyn) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/dotnet/roslyn/releases) - [Changelog](https://github.com/dotnet/roslyn/blob/main/docs/Breaking%20API%20Changes.md) - [Commits](https://github.com/dotnet/roslyn/commits) --- updated-dependencies: - dependency-name: Microsoft.CodeAnalysis.Common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 7442652c34d..ba5249c8bdb 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + From c1a5b1f09d14b73a35b0596b206ddcf597b5b00b Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 25 May 2023 10:46:48 +0800 Subject: [PATCH 2/6] Update Directory.Packages.props --- Directory.Packages.props | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index ba5249c8bdb..db57191a69f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,14 +13,14 @@ - + - - - - - - + + + + + + @@ -42,4 +42,4 @@ - \ No newline at end of file + From 080c3d390302c867ad9d2be16d8055e0ffaadf2d Mon Sep 17 00:00:00 2001 From: yufeih Date: Thu, 25 May 2023 02:50:42 +0000 Subject: [PATCH 3/6] test(snapshot): update snapshots for d3183f704910d87ec25362926ca45f45532ed38f --- ...embersInInterfaces.RepeatSequence.html.view.verified.json | 5 +++-- .../api/CSharp8.ReadOnlyMembers.html.view.verified.json | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp11.StaticAbstractMembersInInterfaces.RepeatSequence.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp11.StaticAbstractMembersInInterfaces.RepeatSequence.html.view.verified.json index fa92b8b6143..f8d1c63aa42 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp11.StaticAbstractMembersInInterfaces.RepeatSequence.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp11.StaticAbstractMembersInInterfaces.RepeatSequence.html.view.verified.json @@ -437,7 +437,8 @@ "value": "" } ] - } + }, + "description": "

The fully qualified type name.

\n" } }, "source": { @@ -546,7 +547,7 @@ }, "level": 0.0, "type": "method", - "summary": "", + "summary": "

Returns the fully qualified type name of this instance.

\n", "platform": null, "docurl": "https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=CSharp11_StaticAbstractMembersInInterfaces_RepeatSequence_ToString.md&value=---%0Auid%3A%20CSharp11.StaticAbstractMembersInInterfaces.RepeatSequence.ToString%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", "sourceurl": "https://github.com/dotnet/docfx/blob/main/samples/csharp/src/CSharp11.cs/#L20", diff --git a/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp8.ReadOnlyMembers.html.view.verified.json b/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp8.ReadOnlyMembers.html.view.verified.json index 204f913685e..1482c2578b9 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp8.ReadOnlyMembers.html.view.verified.json +++ b/test/docfx.Snapshot.Tests/SamplesTest.CSharp/api/CSharp8.ReadOnlyMembers.html.view.verified.json @@ -880,7 +880,8 @@ "value": "" } ] - } + }, + "description": "

The fully qualified type name.

\n" } }, "source": { @@ -989,7 +990,7 @@ }, "level": 0.0, "type": "method", - "summary": "", + "summary": "

Returns the fully qualified type name of this instance.

\n", "platform": null, "docurl": "https://github.com/dotnet/docfx/new/main/apiSpec/new?filename=CSharp8_ReadOnlyMembers_ToString.md&value=---%0Auid%3A%20CSharp8.ReadOnlyMembers.ToString%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A", "sourceurl": "https://github.com/dotnet/docfx/blob/main/samples/csharp/src/CSharp8.cs/#L18", From 447628138842623e03a28de276d828ac891becf3 Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Thu, 25 May 2023 17:03:08 +0800 Subject: [PATCH 4/6] fix tests --- .../GenerateMetadataFromCSUnitTest.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs b/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs index 55330174fb0..492de95ac88 100644 --- a/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs +++ b/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs @@ -2640,19 +2640,19 @@ public void EnumUndefinedValue(ConsoleKey? key = (ConsoleKey)999) { } var flagsDefault = output.Items[0].Items[0].Items[1]; Assert.NotNull(flagsDefault); - Assert.Equal(@"public void EnumDefault(ConsoleSpecialKey? key = 0)", flagsDefault.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void EnumDefault(ConsoleSpecialKey? key = ConsoleSpecialKey.ControlC)", flagsDefault.Syntax.Content[SyntaxLanguage.CSharp]); var flagsValue = output.Items[0].Items[0].Items[2]; Assert.NotNull(flagsValue); - Assert.Equal(@"public void EnumValue(ConsoleSpecialKey? key = 1)", flagsValue.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void EnumValue(ConsoleSpecialKey? key = ConsoleSpecialKey.ControlBreak)", flagsValue.Syntax.Content[SyntaxLanguage.CSharp]); var enumUndefinedDefault = output.Items[0].Items[0].Items[3]; Assert.NotNull(enumUndefinedDefault); - Assert.Equal(@"public void EnumUndefinedDefault(ConsoleKey? key = 0)", enumUndefinedDefault.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void EnumUndefinedDefault(ConsoleKey? key = (ConsoleKey)0)", enumUndefinedDefault.Syntax.Content[SyntaxLanguage.CSharp]); var enumUndefinedValue = output.Items[0].Items[0].Items[4]; Assert.NotNull(enumUndefinedValue); - Assert.Equal(@"public void EnumUndefinedValue(ConsoleKey? key = 999)", enumUndefinedValue.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void EnumUndefinedValue(ConsoleKey? key = (ConsoleKey)999)", enumUndefinedValue.Syntax.Content[SyntaxLanguage.CSharp]); } [Fact] @@ -2681,19 +2681,19 @@ public void FlagsUndefinedValue(AttributeTargets? targets = (AttributeTargets)65 var enumDefault = output.Items[0].Items[0].Items[1]; Assert.NotNull(enumDefault); - Assert.Equal(@"public void FlagsDefault(Base64FormattingOptions? options = 0)", enumDefault.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void FlagsDefault(Base64FormattingOptions? options = Base64FormattingOptions.None)", enumDefault.Syntax.Content[SyntaxLanguage.CSharp]); var enumValue = output.Items[0].Items[0].Items[2]; Assert.NotNull(enumValue); - Assert.Equal(@"public void FlagsValue(Base64FormattingOptions? options = 1)", enumValue.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void FlagsValue(Base64FormattingOptions? options = Base64FormattingOptions.InsertLineBreaks)", enumValue.Syntax.Content[SyntaxLanguage.CSharp]); var flagsUndefinedDefault = output.Items[0].Items[0].Items[3]; Assert.NotNull(flagsUndefinedDefault); - Assert.Equal(@"public void FlagsUndefinedDefault(AttributeTargets? targets = 0)", flagsUndefinedDefault.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void FlagsUndefinedDefault(AttributeTargets? targets = (AttributeTargets)0)", flagsUndefinedDefault.Syntax.Content[SyntaxLanguage.CSharp]); var flagsUndefinedValue = output.Items[0].Items[0].Items[4]; Assert.NotNull(flagsUndefinedValue); - Assert.Equal(@"public void FlagsUndefinedValue(AttributeTargets? targets = 65536)", flagsUndefinedValue.Syntax.Content[SyntaxLanguage.CSharp]); + Assert.Equal(@"public void FlagsUndefinedValue(AttributeTargets? targets = (AttributeTargets)65536)", flagsUndefinedValue.Syntax.Content[SyntaxLanguage.CSharp]); } [Fact] From 0fc68773ef4fab6bac9f34f16cb4380c59d227ab Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Fri, 26 May 2023 10:35:44 +0800 Subject: [PATCH 5/6] update nuget.frameworks --- Directory.Packages.props | 2 +- NuGet.config | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index db57191a69f..b428296085c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -36,7 +36,7 @@ - + diff --git a/NuGet.config b/NuGet.config index 89033e76deb..1f3f6656670 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,8 +9,5 @@ - - - From 8cbcd8e0623bed1dbd0acadebe50e65114c695ed Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Fri, 26 May 2023 12:08:42 +0800 Subject: [PATCH 6/6] fix "The feature 'primary constructors' is currently in Preview and *unsupported*" --- test/docfx.Tests/CompositeCommandTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/docfx.Tests/CompositeCommandTest.cs b/test/docfx.Tests/CompositeCommandTest.cs index 6b4690f9d8c..14d17d758e5 100644 --- a/test/docfx.Tests/CompositeCommandTest.cs +++ b/test/docfx.Tests/CompositeCommandTest.cs @@ -48,7 +48,7 @@ namespace Hello{ /// } /// /// -public class HelloWorld(){}} +public class HelloWorld {}} "; var sourceFile = Path.Combine(_projectFolder, "src", "test.cs"); CreateFile(sourceFile, sourceCode, "src");