Skip to content

Commit f8a55d4

Browse files
authored
Merge pull request #595 from mono/develop
bump mdoc to 5.8.6
2 parents d499d22 + 025337d commit f8a55d4

43 files changed

Lines changed: 250 additions & 860 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "external/SharpZipLib"]
2-
path = external/SharpZipLib
3-
url = https://github.com/icsharpcode/SharpZipLib.git
41
[submodule "external/Lucene.Net.Light"]
52
path = external/Lucene.Net.Light
63
url = https://github.com/mono/Lucene.Net.Light.git

Directory.Build.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project>
2+
<PropertyGroup>
3+
<NuGetVersionFSharpCore>4.3.4</NuGetVersionFSharpCore>
4+
<NuGetVersionMonoCecil>0.10.0-beta5</NuGetVersionMonoCecil>
5+
<NuGetVersionNUnit>3.10.1</NuGetVersionNUnit>
6+
<NuGetVersionNUnit3TestAdapter>3.13.0</NuGetVersionNUnit3TestAdapter>
7+
<NuGetVersionQuickIONET>2.6.2.0</NuGetVersionQuickIONET>
8+
<NuGetVersionSharpZipLib>1.3.3</NuGetVersionSharpZipLib>
9+
<NuGetVersionSystemConfigurationConfigurationManager>6.0.0</NuGetVersionSystemConfigurationConfigurationManager>
10+
</PropertyGroup>
11+
</Project>

apidoctools.sln

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monodoc", "monodoc\monodoc.
99
EndProject
1010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monodoc.Test", "monodoc\Test\Monodoc.Test.csproj", "{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZipLib", "external\SharpZipLib\ICSharpCode.SharpZipLib.NET45\ICSharpCode.SharpZipLib.csproj", "{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}"
13-
EndProject
1412
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mdoc.Test", "mdoc\mdoc.Test\mdoc.Test.csproj", "{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}"
1513
EndProject
1614
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "mdoc.Test.FSharp", "mdoc\mdoc.Test\mdoc.Test.FSharp\mdoc.Test.FSharp.fsproj", "{979F9F80-12FE-4236-9E93-6D554AB13701}"
@@ -75,22 +73,6 @@ Global
7573
{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}.Release|x64.Build.0 = Release|Any CPU
7674
{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}.Release|x86.ActiveCfg = Release|Any CPU
7775
{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}.Release|x86.Build.0 = Release|Any CPU
78-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
79-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
80-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|ARM.ActiveCfg = Debug|Any CPU
81-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|ARM.Build.0 = Debug|Any CPU
82-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x64.ActiveCfg = Debug|Any CPU
83-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x64.Build.0 = Debug|Any CPU
84-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x86.ActiveCfg = Debug|Any CPU
85-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x86.Build.0 = Debug|Any CPU
86-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
87-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.Build.0 = Release|Any CPU
88-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|ARM.ActiveCfg = Release|Any CPU
89-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|ARM.Build.0 = Release|Any CPU
90-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x64.ActiveCfg = Release|Any CPU
91-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x64.Build.0 = Release|Any CPU
92-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x86.ActiveCfg = Release|Any CPU
93-
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x86.Build.0 = Release|Any CPU
9476
{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
9577
{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
9678
{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}.Debug|ARM.ActiveCfg = Debug|Any CPU

external/SharpZipLib

Lines changed: 0 additions & 1 deletion
This file was deleted.
1 KB
Binary file not shown.

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.5";
6+
public static string MonoVersion = "5.8.6";
77
public const string DocId = "DocId";
88
public const string CppCli = "C++ CLI";
99
public const string CppCx = "C++ CX";

mdoc/Makefile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ Test/DocTest-nestedType-typeForwards-First.dll:
174174
rm -f $@
175175
$(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -debug -optimize -target:library -out:$@ Test/DocTest-nestedType-typeForwards.cs /define:FIRST
176176

177+
Test/DocTest-LongFileName.dll:
178+
rm -f DocTest-LongFileName.dll
179+
$(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -debug -optimize -target:library -out:$@ Test/DocTest-LongFileName.cs
180+
177181
.PHONY: Test/DocTest-nestedType-typeForwards-Second.dll
178182
Test/DocTest-nestedType-typeForwards-Second.dll:
179183
rm -f $@
@@ -874,6 +878,19 @@ check-type-projection: Test/DocTest-TypeProjection.dll
874878
$(MONO) $(PROGRAM) update -fx Test/test-type-projection/ -o Test/en.actual/
875879
$(DIFF) Test/en.expected-type-projection Test/en.actual/
876880

881+
check-long-file-name: Test/DocTest-LongFileName.dll
882+
rm -Rf Test/en.actual
883+
rm -Rf Test/test-long-file-name
884+
885+
mkdir Test/test-long-file-name
886+
mkdir Test/test-long-file-name/DocTest-LongFileName
887+
mkdir Test/en.actual
888+
889+
cp Test/DocTest-LongFileName.dll Test/test-long-file-name/DocTest-LongFileName
890+
891+
$(MONO) $(PROGRAM) fx-bootstrap Test/test-long-file-name
892+
$(MONO) $(PROGRAM) update -fx Test/test-long-file-name -o Test/en.actual/
893+
877894
run-test-local: check-doc-tools
878895

879896
run-test-update : check-doc-tools-update
@@ -930,7 +947,8 @@ check-doc-tools: \
930947
check-monodocer-embedded-type \
931948
check-ignored-namespace-generic \
932949
check-multiple-mdoc \
933-
check-type-projection
950+
check-type-projection \
951+
check-long-file-name
934952

935953
#check-monodocer-dropns-delete
936954
check-doc-tools-update: check-monodocer-since-update \

mdoc/Mono.Documentation/MDocUpdater.cs

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Globalization;
66
using System.IO;
77
using System.Linq;
8+
using System.Runtime.InteropServices;
89
using System.Text;
910
using System.Xml;
1011
using System.Xml.Linq;
@@ -16,7 +17,7 @@
1617
using Mono.Documentation.Updater.Statistics;
1718
using Mono.Documentation.Util;
1819
using Mono.Options;
19-
20+
using SchwabenCode.QuickIO;
2021
using MyXmlNodeList = System.Collections.Generic.List<System.Xml.XmlNode>;
2122
using StringList = System.Collections.Generic.List<string>;
2223
using StringToXmlNodeMap = System.Collections.Generic.Dictionary<string, System.Xml.XmlNode>;
@@ -692,8 +693,8 @@ private static void WriteNamespaceStub (string ns, string outdir)
692693
index_remarks.InnerText = "To be added.";
693694
index_docs.AppendChild (index_remarks);
694695

695-
WriteFile (outdir + "/ns-" + ns + ".xml", FileMode.CreateNew,
696-
writer => WriteXml (index.DocumentElement, writer));
696+
var nsDocPath = DocUtils.PathCombine(outdir, $"ns-{ns}.xml");
697+
WriteFile (nsDocPath, FileMode.CreateNew, writer => WriteXml (index.DocumentElement, writer));
697698
}
698699

699700
public void DoUpdateTypes (string basepath, List<string> typenames, string dest)
@@ -1039,7 +1040,7 @@ private void AddIndexType (TypeDefinition type, XmlElement index_types)
10391040

10401041
private void DoUpdateAssemblies (string source, string dest)
10411042
{
1042-
string indexfile = dest + "/index.xml";
1043+
string indexfile = DocUtils.PathCombine(dest, "index.xml");
10431044
XmlDocument index;
10441045
if (System.IO.File.Exists (indexfile))
10451046
{
@@ -1417,10 +1418,8 @@ private void CleanupFiles (string dest, HashSet<string> goodfiles)
14171418

14181419
private static TextWriter OpenWrite (string path, FileMode mode)
14191420
{
1420-
var w = new StreamWriter (
1421-
new FileStream (path, mode),
1422-
new UTF8Encoding (false)
1423-
);
1421+
var fs = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? QuickIOFile.Open(Path.GetFullPath(path), mode) : new FileStream(path, mode);
1422+
var w = new StreamWriter (fs, new UTF8Encoding (false));
14241423
w.NewLine = "\n";
14251424
return w;
14261425
}
@@ -4176,6 +4175,19 @@ private void MakeTypeParameters (FrameworkTypeEntry entry, XmlElement root, ILis
41764175
}
41774176
}
41784177
}
4178+
4179+
nodes = e.SelectNodes("TypeParameter").Cast<XmlElement>().ToArray();
4180+
if (nodes.Length != typeParams.Count)
4181+
{
4182+
foreach (var node in nodes)
4183+
{
4184+
var existing = typeParams.FirstOrDefault(x => x.Name == node.GetAttribute("Name"));
4185+
if (existing == null)
4186+
{
4187+
node.ParentNode.RemoveChild(node);
4188+
}
4189+
}
4190+
}
41794191
}
41804192

41814193
private void MakeParameters (XmlElement root, MemberReference mi, FrameworkTypeEntry typeEntry, ref bool fxAlternateTriggered, bool shouldDuplicateWithNew)

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,18 @@ private StringBuilder AppendParameter (StringBuilder buf, ParameterDefinition pa
573573
if (parameter.ParameterType is ByReferenceType)
574574
{
575575
if (parameter.IsOut)
576+
{
576577
buf.Append ("out ");
578+
}
577579
else
578-
buf.Append ("ref ");
580+
{
581+
if (parameter.HasCustomAttributes && parameter.CustomAttributes.Any (ca => ca.AttributeType.Name == "IsReadOnlyAttribute"))
582+
buf.Append ("in ");
583+
else
584+
buf.Append ("ref ");
585+
}
579586
}
587+
580588
if (parameter.HasCustomAttributes)
581589
{
582590
var isParams = parameter.CustomAttributes.Any (ca => ca.AttributeType.Name == "ParamArrayAttribute");
@@ -596,6 +604,7 @@ private StringBuilder AppendParameter (StringBuilder buf, ParameterDefinition pa
596604
var ReturnVal = new AttributeFormatter().MakeAttributesValueString(parameter.Constant, parameter.ParameterType);
597605
buf.AppendFormat (" = {0}", ReturnVal == "null" ? "default" : ReturnVal);
598606
}
607+
599608
return buf;
600609
}
601610

0 commit comments

Comments
 (0)