From f7d053a0d6f7e0e1decb372095821ed9344e4d49 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 26 Feb 2019 18:41:11 -0500 Subject: [PATCH] nuget-hash-extractor: Improvements to reduce unnecessary diffs on update (#13197) * [nuget-hash-extractor] Make the order for denied lists deterministic and .. stable. We were not sorting the list of assemblies with the same version, causing irrelevant changes in updates. * Update denied assembly list to fix order .. to be deterministic. Generated with the updated nuget-hash-extractor.cs . * [nuget-hash-extractor] Make the order of assemblies deterministic The .nupkgs were being processed in arbitrary order, causing unncessary diffs when updating them which required manual work to check and fix them. --- mcs/tools/xbuild/data/deniedAssembliesList.txt | 48 +++++++++++----------- tools/nuget-hash-extractor/nuget-hash-extractor.cs | 5 ++- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/mcs/tools/xbuild/data/deniedAssembliesList.txt b/mcs/tools/xbuild/data/deniedAssembliesList.txt index 1035b384d29..450be611956 100644 --- a/mcs/tools/xbuild/data/deniedAssembliesList.txt +++ b/mcs/tools/xbuild/data/deniedAssembliesList.txt @@ -1,58 +1,58 @@ System.Globalization.Extensions.dll,475DBF02-9F68-44F1-8FB5-C9F69F1BD2B1,4,0,0,0 System.Globalization.Extensions.dll,5FCD54F0-4B97-4259-875D-30E481F02EA2,4,0,1,0 System.Globalization.Extensions.dll,E9FCFF5B-4DE1-4BDC-9CE8-08C640FC78CC,4,0,2,0 -System.Globalization.Extensions.dll,50F4163A-D692-452F-90ED-2F8024BB5319,4,1,0,0 +System.Globalization.Extensions.dll,1A2B9B2A-02F5-4C78-AB0C-7C6D2795CE2B,4,1,0,0 System.Globalization.Extensions.dll,28006E9A-74DB-45AC-8A8D-030CEBAA272A,4,1,0,0 -System.Globalization.Extensions.dll,FC1439FC-C1B8-4DB1-914D-165CCFA77002,4,1,0,0 System.Globalization.Extensions.dll,3B30D67C-B16B-47BC-B949-9500B5AAAAFB,4,1,0,0 +System.Globalization.Extensions.dll,50F4163A-D692-452F-90ED-2F8024BB5319,4,1,0,0 System.Globalization.Extensions.dll,B9BA8638-25D2-4A3B-B91F-16B3D3799861,4,1,0,0 -System.Globalization.Extensions.dll,1A2B9B2A-02F5-4C78-AB0C-7C6D2795CE2B,4,1,0,0 +System.Globalization.Extensions.dll,FC1439FC-C1B8-4DB1-914D-165CCFA77002,4,1,0,0 System.IO.Compression.dll,44FCA06C-A510-4B3E-BDBF-D08D697EF65A,4,1,0,0 System.IO.Compression.dll,3A58A219-266B-47C3-8BE8-4E4F394147AB,4,1,2,0 -System.IO.Compression.dll,33AD8174-7781-46FA-A110-33821CCBE810,4,2,0,0 -System.IO.Compression.dll,1332CE2F-1517-4BD7-93FD-7D4BCFBAED66,4,2,0,0 System.IO.Compression.dll,05C07BD4-AFF1-4B12-900B-F0A5EB88DDB4,4,2,0,0 -System.IO.Compression.dll,C786B28D-0850-4D4C-AED9-FE6B86EE7C31,4,2,0,0 +System.IO.Compression.dll,1332CE2F-1517-4BD7-93FD-7D4BCFBAED66,4,2,0,0 +System.IO.Compression.dll,33AD8174-7781-46FA-A110-33821CCBE810,4,2,0,0 System.IO.Compression.dll,35DD20B5-8766-476B-B5D2-0EA16EF0A946,4,2,0,0 System.IO.Compression.dll,8DBD1669-97BC-4190-9BD8-738561193741,4,2,0,0 +System.IO.Compression.dll,C786B28D-0850-4D4C-AED9-FE6B86EE7C31,4,2,0,0 System.Net.Http.dll,269B562C-CC15-4736-B1B1-68D4A43CAA98,4,1,0,0 System.Net.Http.dll,EA2EC6DC-51DD-479C-BFC2-E713FB9E7E47,4,1,0,1 -System.Net.Http.dll,C0E04D9C-70CF-48A6-A179-FBFD8CE69FD0,4,1,1,0 System.Net.Http.dll,817F01C3-4011-477D-890A-98232B85553D,4,1,1,0 +System.Net.Http.dll,C0E04D9C-70CF-48A6-A179-FBFD8CE69FD0,4,1,1,0 System.Net.Http.dll,09D4A140-061C-4884-9B63-22067E841931,4,1,1,1 System.Net.Http.dll,56203551-6937-47C1-9246-346A733913EE,4,1,1,2 System.Net.Http.dll,084B071E-1637-4B3F-B7CD-6CEF28A6E4AE,4,1,1,3 +System.Net.Http.dll,27BBDD4C-EAF0-4A95-B172-EE502D76A725,4,2,0,0 +System.Net.Http.dll,41ACE450-8F44-455A-97AC-0679E5462071,4,2,0,0 System.Net.Http.dll,82C79759-CB3C-4EB6-A17C-BDE85AF00A9B,4,2,0,0 System.Net.Http.dll,8E2F55F3-D010-417B-A742-21386EDDD388,4,2,0,0 -System.Net.Http.dll,DB06A592-E332-44A1-8B85-20CAB3C3C147,4,2,0,0 System.Net.Http.dll,903A137B-BB3F-464A-94D4-780B89EE5580,4,2,0,0 -System.Net.Http.dll,27BBDD4C-EAF0-4A95-B172-EE502D76A725,4,2,0,0 -System.Net.Http.dll,41ACE450-8F44-455A-97AC-0679E5462071,4,2,0,0 +System.Net.Http.dll,DB06A592-E332-44A1-8B85-20CAB3C3C147,4,2,0,0 System.Runtime.InteropServices.RuntimeInformation.dll,F13660F8-9D0D-419F-BA4E-315693DD26EA,4,0,0,0 System.Runtime.InteropServices.RuntimeInformation.dll,DD91439F-3167-478E-BD2C-BF9C036A1395,4,0,1,0 -System.Runtime.InteropServices.RuntimeInformation.dll,F580BAAC-12BD-4716-B486-C0A5E3EE6EEA,4,0,2,0 -System.Runtime.InteropServices.RuntimeInformation.dll,33D296D9-EE6D-404E-BF9F-432A429FF5DA,4,0,2,0 -System.Runtime.InteropServices.RuntimeInformation.dll,E5AE3324-2100-4F77-9E41-AEEF226C9649,4,0,2,0 -System.Runtime.InteropServices.RuntimeInformation.dll,6D334D4D-0149-4D07-9DEF-CC52213145CE,4,0,2,0 -System.Runtime.InteropServices.RuntimeInformation.dll,CA2D23DE-55E1-45D8-9720-0EBE3EEC1DF2,4,0,2,0 System.Runtime.InteropServices.RuntimeInformation.dll,0C4BCFB3-F609-4631-93A6-17B19C69D9B6,4,0,2,0 System.Runtime.InteropServices.RuntimeInformation.dll,1F37581E-4589-4C71-A465-05C6B9AE966E,4,0,2,0 +System.Runtime.InteropServices.RuntimeInformation.dll,33D296D9-EE6D-404E-BF9F-432A429FF5DA,4,0,2,0 +System.Runtime.InteropServices.RuntimeInformation.dll,488CE209-4E5D-40E7-BE8C-F81F2B99F13A,4,0,2,0 +System.Runtime.InteropServices.RuntimeInformation.dll,6D334D4D-0149-4D07-9DEF-CC52213145CE,4,0,2,0 System.Runtime.InteropServices.RuntimeInformation.dll,9A3724BF-DF8F-4955-8CFA-41D45F11B586,4,0,2,0 +System.Runtime.InteropServices.RuntimeInformation.dll,CA2D23DE-55E1-45D8-9720-0EBE3EEC1DF2,4,0,2,0 System.Runtime.InteropServices.RuntimeInformation.dll,D87389D8-6E9C-48CF-B128-3637018577AF,4,0,2,0 System.Runtime.InteropServices.RuntimeInformation.dll,E46BA45E-6A63-47CD-AF70-2C3016AFF75A,4,0,2,0 -System.Runtime.InteropServices.RuntimeInformation.dll,488CE209-4E5D-40E7-BE8C-F81F2B99F13A,4,0,2,0 +System.Runtime.InteropServices.RuntimeInformation.dll,E5AE3324-2100-4F77-9E41-AEEF226C9649,4,0,2,0 +System.Runtime.InteropServices.RuntimeInformation.dll,F580BAAC-12BD-4716-B486-C0A5E3EE6EEA,4,0,2,0 System.Runtime.InteropServices.RuntimeInformation.dll,FD6C8616-C1D8-43F9-AC17-A1C48A45FDA2,4,0,2,0 +System.Text.Encoding.CodePages.dll,C142254F-DEB5-46A7-AE43-6F10320D1D1F,4,0,1,0 +System.Text.Encoding.CodePages.dll,FD178CD4-EF4F-44D5-9C3F-812B1E25126B,4,0,2,0 +System.Text.Encoding.CodePages.dll,F5CCCBEC-E1AD-4DBB-9B44-9B42C86B94B8,4,1,0,0 +System.Text.Encoding.CodePages.dll,67D3A14A-8F55-4C9F-9699-EDD0876369DA,4,1,1,0 +System.Text.Encoding.CodePages.dll,D2B4F262-31A4-4E80-9CFB-26A2249A735E,4,1,1,0 System.Threading.Overlapped.dll,9F5D4F09-787A-458A-BA08-553AA71470F1,4,0,0,0 System.Threading.Overlapped.dll,FCBD003B-2BB4-4940-BAEF-63AF520C2336,4,0,1,0 System.Threading.Overlapped.dll,87697E71-D192-4F0B-BAD4-02BBC7793005,4,0,2,0 System.Threading.Overlapped.dll,212BEDF2-E3F5-4D59-8C1A-F4D1C58B46CD,4,1,0,0 -System.Threading.Overlapped.dll,F4FFC4A6-E694-49D9-81B2-12F2C9A29652,4,1,0,0 -System.Threading.Overlapped.dll,E933407E-C846-4413-82C5-09F4BCFA67F1,4,1,0,0 System.Threading.Overlapped.dll,3336A2A3-1772-4EF9-A74B-AFDC80A8B21E,4,1,0,0 -System.Threading.Overlapped.dll,A0439CB6-A5E6-4813-A76C-13F92ADDDED5,4,1,0,0 System.Threading.Overlapped.dll,82D565AC-E41C-4E29-9939-C031C88EDBDD,4,1,0,0 -System.Text.Encoding.CodePages.dll,C142254F-DEB5-46A7-AE43-6F10320D1D1F,4,0,1,0 -System.Text.Encoding.CodePages.dll,FD178CD4-EF4F-44D5-9C3F-812B1E25126B,4,0,2,0 -System.Text.Encoding.CodePages.dll,F5CCCBEC-E1AD-4DBB-9B44-9B42C86B94B8,4,1,0,0 -System.Text.Encoding.CodePages.dll,67D3A14A-8F55-4C9F-9699-EDD0876369DA,4,1,1,0 -System.Text.Encoding.CodePages.dll,D2B4F262-31A4-4E80-9CFB-26A2249A735E,4,1,1,0 +System.Threading.Overlapped.dll,A0439CB6-A5E6-4813-A76C-13F92ADDDED5,4,1,0,0 +System.Threading.Overlapped.dll,E933407E-C846-4413-82C5-09F4BCFA67F1,4,1,0,0 +System.Threading.Overlapped.dll,F4FFC4A6-E694-49D9-81B2-12F2C9A29652,4,1,0,0 diff --git a/tools/nuget-hash-extractor/nuget-hash-extractor.cs b/tools/nuget-hash-extractor/nuget-hash-extractor.cs index 6d17e8095ba..52d97e7fe34 100644 --- a/tools/nuget-hash-extractor/nuget-hash-extractor.cs +++ b/tools/nuget-hash-extractor/nuget-hash-extractor.cs @@ -102,7 +102,8 @@ class Driver { // Sory by assembly name and version var query = ignoredAsmTable.Values .GroupBy (data => data.AssemblyName) - .Select (group => new { AssemblyName = group.Key, NuGets = group.OrderBy (data => data.AssemblyVersion) }); + .OrderBy (group => group.Key) + .Select (group => new { AssemblyName = group.Key, NuGets = group.OrderBy (data => data.AssemblyVersion).ThenBy (data => data.ModuleVersionId) }); foreach (var g in query) { foreach (var data in g.NuGets) { @@ -126,7 +127,7 @@ class Driver { } else { dump_asm = true; } - foreach (var f in Directory.GetFiles (args [0], "*.nupkg")) { + foreach (var f in Directory.GetFiles (args [0], "*.nupkg").OrderBy (nupkg => Path.GetFileName (nupkg))) { DumpNuget (f); } -- 2.11.4.GIT