Skip to content

Commit 8b42e0d

Browse files
authored
Sort assembly files and update expected XML files (#526)
This change brings a higher consistency across environments, as originally the .dlls were read in whatever order the operating system enumerated them in; this proved to be inconsistent over time, so this will reduce unexpected results going forward.
1 parent 27c8462 commit 8b42e0d

File tree

25 files changed

+38
-35
lines changed

25 files changed

+38
-35
lines changed

mdoc/Mono.Documentation/MDocUpdater.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,12 @@ public override void Run (IEnumerable<string> args)
360360

361361
Func<string, string, IEnumerable<string>> getFiles = (string path, string filters) =>
362362
{
363-
return filters
364-
.Split ('|')
365-
.SelectMany (v => Directory.GetFiles (path, v));
363+
var assemblyFiles = filters.Split('|').SelectMany(v => Directory.GetFiles(path, v));
364+
365+
// Directory.GetFiles method returned file names is not sort,
366+
// this makes the order of the assembly elements of our generated XML files is inconsistent in different environments,
367+
// so we need to sort it.
368+
return new SortedSet<string>(assemblyFiles);
366369
};
367370

368371
var sets = fxd.Select (d => new AssemblySet (

mdoc/Test/en.expected-cppcli/FrameworksIndex/One.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
33
<Assemblies>
4-
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
54
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
66
</Assemblies>
77
<Namespace Name="MyFramework.MyNamespace">
88
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">

mdoc/Test/en.expected-cppcli/FrameworksIndex/Two.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
33
<Assemblies>
4-
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
54
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
66
</Assemblies>
77
<Namespace Name="MyFramework.MyOtherNamespace">
88
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">

mdoc/Test/en.expected-cppcli/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</Attribute>
1111
</Attributes>
1212
</Assembly>
13-
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0">
13+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0">
1414
<Attributes>
1515
<Attribute>
1616
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
@@ -20,7 +20,7 @@
2020
</Attribute>
2121
</Attributes>
2222
</Assembly>
23-
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0">
23+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0">
2424
<Attributes>
2525
<Attribute>
2626
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>

mdoc/Test/en.expected-cppcx/FrameworksIndex/One.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
33
<Assemblies>
4-
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
54
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
66
</Assemblies>
77
<Namespace Name="MyFramework.MyNamespace">
88
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">

mdoc/Test/en.expected-cppcx/FrameworksIndex/Two.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
33
<Assemblies>
4-
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
54
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
66
</Assemblies>
77
<Namespace Name="MyFramework.MyOtherNamespace">
88
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">

mdoc/Test/en.expected-cppcx/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</Attribute>
1111
</Attributes>
1212
</Assembly>
13-
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0">
13+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0">
1414
<Attributes>
1515
<Attribute>
1616
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
@@ -20,7 +20,7 @@
2020
</Attribute>
2121
</Attributes>
2222
</Assembly>
23-
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0">
23+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0">
2424
<Attributes>
2525
<Attribute>
2626
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>

mdoc/Test/en.expected-cppwinrt/FrameworksIndex/One.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="One">
33
<Assemblies>
4-
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
54
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-DropNS-classic" Version="0.0.0.0" />
66
</Assemblies>
77
<Namespace Name="MyFramework.MyNamespace">
88
<Type Name="MyFramework.MyNamespace.MyClass" Id="T:MyFramework.MyNamespace.MyClass">

mdoc/Test/en.expected-cppwinrt/FrameworksIndex/Two.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Framework Name="Two">
33
<Assemblies>
4-
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
54
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0" />
5+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0" />
66
</Assemblies>
77
<Namespace Name="MyFramework.MyOtherNamespace">
88
<Type Name="MyFramework.MyOtherNamespace.MyOtherClass" Id="T:MyFramework.MyOtherNamespace.MyOtherClass">

mdoc/Test/en.expected-cppwinrt/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</Attribute>
1111
</Attributes>
1212
</Assembly>
13-
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0">
13+
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0">
1414
<Attributes>
1515
<Attribute>
1616
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
@@ -20,7 +20,7 @@
2020
</Attribute>
2121
</Attributes>
2222
</Assembly>
23-
<Assembly Name="DocTest-addNonGeneric" Version="0.0.0.0">
23+
<Assembly Name="DocTest-DropNS-classic-secondary" Version="0.0.0.0">
2424
<Attributes>
2525
<Attribute>
2626
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>

0 commit comments

Comments
 (0)