Skip to content

Commit e0baf60

Browse files
authored
Merge pull request #648 from mono/develop
bump mdoc to 5.9.0
2 parents 97c1778 + 796b1e1 commit e0baf60

26 files changed

Lines changed: 150 additions & 65 deletions

Directory.Build.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<Project>
22
<PropertyGroup>
33
<NuGetVersionFSharpCore>4.3.4</NuGetVersionFSharpCore>
4-
<NuGetVersionMonoCecil>0.10.0-beta5</NuGetVersionMonoCecil>
4+
<NuGetVersionMonoCecil>0.10.0</NuGetVersionMonoCecil>
55
<NuGetVersionNUnit>3.10.1</NuGetVersionNUnit>
6-
<NuGetVersionNUnit3TestAdapter>3.13.0</NuGetVersionNUnit3TestAdapter>
6+
<NuGetVersionNUnit3TestAdapter>3.17.0</NuGetVersionNUnit3TestAdapter>
7+
<NuGetVersionMicrosoftNETTestSdk>16.11.0</NuGetVersionMicrosoftNETTestSdk>
78
<NuGetVersionQuickIONET>2.6.2.0</NuGetVersionQuickIONET>
89
<NuGetVersionSharpZipLib>1.3.3</NuGetVersionSharpZipLib>
910
<NuGetVersionSystemConfigurationConfigurationManager>6.0.0</NuGetVersionSystemConfigurationConfigurationManager>
1011
<NuGetVersionLuceneDotNet>3.0.3</NuGetVersionLuceneDotNet>
12+
<NuGetVersionNewtonsoftJson>13.0.1</NuGetVersionNewtonsoftJson>
1113
</PropertyGroup>
1214
</Project>

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
MSBUILD = msbuild
21
CONFIGURATION = Release
32
BIN = bin/$(CONFIGURATION)
43
MDOC = $(BIN)/mdoc.exe
@@ -9,15 +8,15 @@ all: build
98
build: $(MDOC)
109

1110
$(MDOC):
12-
$(MSBUILD) apidoctools.sln /p:Configuration=$(CONFIGURATION);
11+
dotnet build -v:n apidoctools.sln /p:Configuration=$(CONFIGURATION)
1312

1413
prepare:
1514
git submodule update --init --recursive
16-
nuget restore apidoctools.sln
15+
dotnet restore apidoctools.sln
1716
nuget install NUnit.Console -version 3.6.0 -NoCache -o packages
1817

1918
clean:
20-
#$(MSBUILD) apidoctools.sln /t:clean
19+
dotnet build -v:n apidoctools.sln /t:clean /p:Configuration=$(CONFIGURATION)
2120
rm -rf bin/$(CONFIGURATION)
2221

2322
check: build check-monodoc check-mdoc

azure-pipelines.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,26 @@ stages:
9595
- task: NuGetToolInstaller@1
9696
displayName: Install NuGet Tool
9797

98-
- task: Bash@3
99-
displayName: Run Unit and Integration Tests
100-
inputs:
101-
targetType: 'inline'
102-
script: 'make prepare all check CONFIGURATION=$(buildConfiguration)'
103-
10498
- task: UseDotNet@2
10599
displayName: 'Use .NET Core sdk'
106100
inputs:
107101
packageType: sdk
108102
version: 2.1.x
109103
installationPath: $(Agent.ToolsDirectory)/dotnet
110104

105+
- task: UseDotNet@2
106+
displayName: 'Use .NET 6.0.x'
107+
inputs:
108+
packageType: sdk
109+
version: 6.0.x
110+
installationPath: $(Agent.ToolsDirectory)/dotnet
111+
112+
- task: Bash@3
113+
displayName: Run Unit and Integration Tests
114+
inputs:
115+
targetType: 'inline'
116+
script: 'make prepare clean all check CONFIGURATION=$(buildConfiguration)'
117+
111118
- task: EsrpCodeSigning@1
112119
displayName: Sign executable and dll files
113120
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))

mdoc/Consts.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace Mono.Documentation
33
{
44
public static class Consts
55
{
6-
public static string MonoVersion = "5.8.9.2";
6+
public static string MonoVersion = "5.9.0";
77
public const string DocId = "DocId";
88
public const string CppCli = "C++ CLI";
99
public const string CppCx = "C++ CX";

mdoc/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ cleanup:
6161
nunit:
6262
mono ../packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe mdoc.Test/bin/$(CONFIGURATION)/mdoc.Test.dll
6363

64+
dotnet-test:
65+
dotnet test mdoc.Test/bin/$(CONFIGURATION)-net6.0/mdoc.Test.dll
66+
6467
Test/DocTest-VB-Eii.dll:
6568
$(VBCOMPILE) -out:Test/DocTest-VB-Eii.dll Test/ClassEnumerator.vb
6669

@@ -960,5 +963,5 @@ check-doc-tools-update: check-monodocer-since-update \
960963
check-mdoc-export-msxdoc-update \
961964
check-mdoc-validate-update
962965

963-
check: nunit check-doc-tools
966+
check: nunit dotnet-test check-doc-tools
964967
@echo "mdoc Tests Complete!"

mdoc/Mono.Documentation/MDocUpdater.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ public void DoUpdateType2 (string message, XmlDocument basefile, TypeDefinition
15501550
bool isprivateeii = !IsMemberNotPrivateEII(oldmember2);
15511551
if (oldmember2 == null || isprivateeii)
15521552
{
1553-
if (!string.IsNullOrWhiteSpace (FrameworksPath) && !isprivateeii) // only do this check if fx mode AND it's not a private EII. If it's a private EII, we just want to delete it
1553+
if (!string.IsNullOrWhiteSpace (FrameworksPath)) // only do this check if fx mode
15541554
{
15551555
// verify that this member wasn't seen in another framework and is indeed valid
15561556
var sigFromXml = oldmember
@@ -1939,11 +1939,9 @@ void DeleteMember (string reason, string output, XmlNode member, MyXmlNodeList t
19391939
signature);
19401940

19411941
// Identify all of the different states that could affect our decision to delete the member
1942-
bool duplicated = reason.Contains("Duplicate Member");
19431942
bool shouldPreserve = !string.IsNullOrWhiteSpace (PreserveTag);
19441943
bool hasContent = MemberDocsHaveUserContent (member);
1945-
//When the member is NOT PRESERVED, the member has NO CONTENT or is DUPLICATED, then it should be deleted
1946-
bool shouldDelete = !shouldPreserve && (delete && (!hasContent || duplicated));
1944+
bool shouldDelete = !shouldPreserve && (delete || !hasContent);
19471945

19481946
bool unifiedRun = HasDroppedNamespace (type);
19491947

mdoc/Mono.Documentation/Updater/Formatters/FSharpFormatter.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,16 @@ protected override string GetPropertyDeclaration(PropertyDefinition property)
734734
if (isField)
735735
buf.Append("val ");
736736
else
737-
buf.Append("member this.");
737+
{
738+
if (property.GetMethod?.IsStatic ?? false)
739+
{
740+
buf.Append("static member ");
741+
}
742+
else
743+
{
744+
buf.Append("member this.");
745+
}
746+
}
738747
}
739748

740749
buf.Append(DocUtils.GetPropertyName(property, NestedTypeSeparator));

mdoc/Mono.Documentation/Updater/Frameworks/MDocResolver.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,10 @@ static string GetCurrentMonoGac()
564564

565565
internal AssemblyDefinition GetAssemblyInGac(AssemblyNameReference reference, ReaderParameters parameters)
566566
{
567+
#if NETCOREAPP
568+
return null;
569+
#endif //NETCOREAPP
570+
567571
if (reference.PublicKeyToken == null || reference.PublicKeyToken.Length == 0)
568572
return null;
569573

mdoc/Test/en.expected-attached-entities/AttachedEventsAndProperties/AquariumFilter.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<MemberSignature Language="ILAsm" Value=".property class System.Windows.RoutedEvent NeedsCleaningEvent" />
4545
<MemberSignature Language="DocId" Value="P:AttachedEventsAndProperties.AquariumFilter.NeedsCleaningEvent" />
4646
<MemberSignature Language="VB.NET" Value="Public Shared Property NeedsCleaningEvent As RoutedEvent" />
47-
<MemberSignature Language="F#" Value="member this.NeedsCleaningEvent : System.Windows.RoutedEvent with get, set" Usage="AttachedEventsAndProperties.AquariumFilter.NeedsCleaningEvent" />
47+
<MemberSignature Language="F#" Value="static member NeedsCleaningEvent : System.Windows.RoutedEvent with get, set" Usage="AttachedEventsAndProperties.AquariumFilter.NeedsCleaningEvent" />
4848
<MemberSignature Language="JavaScript" Usage="var routedEvent = AquariumFilter.needsCleaningEvent;&#xA;AquariumFilter.needsCleaningEvent = routedEvent;" />
4949
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property System::Windows::RoutedEvent ^ NeedsCleaningEvent { System::Windows::RoutedEvent ^ get(); void set(System::Windows::RoutedEvent ^ value); };" />
5050
<MemberSignature Language="C++ WINRT" Value="static System::Windows::RoutedEvent NeedsCleaningEvent();&#xA;&#xA;static void NeedsCleaningEvent(System::Windows::RoutedEvent value);" />

mdoc/Test/en.expected-attached-entities/AttachedEventsAndProperties/AttachedPropertyExample.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
<MemberSignature Language="ILAsm" Value=".property bool IsDuplicated" />
171171
<MemberSignature Language="DocId" Value="P:AttachedEventsAndProperties.AttachedPropertyExample.IsDuplicated" />
172172
<MemberSignature Language="VB.NET" Value="Public Shared Property IsDuplicated As Boolean" />
173-
<MemberSignature Language="F#" Value="member this.IsDuplicated : bool with get, set" Usage="AttachedEventsAndProperties.AttachedPropertyExample.IsDuplicated" />
173+
<MemberSignature Language="F#" Value="static member IsDuplicated : bool with get, set" Usage="AttachedEventsAndProperties.AttachedPropertyExample.IsDuplicated" />
174174
<MemberSignature Language="JavaScript" Usage="var boolean = AttachedPropertyExample.isDuplicated;&#xA;AttachedPropertyExample.isDuplicated = boolean;" />
175175
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property bool IsDuplicated { bool get(); void set(bool value); };" />
176176
<MemberSignature Language="C++ CX" Value="public:&#xA; static property bool IsDuplicated { bool get(); void set(bool value); };" />

0 commit comments

Comments
 (0)