提交 9c25e599 编写于 作者: J Jared Parsons

Added verification that fixed packages don't get out of date

上级 75d8b7f5
......@@ -4,7 +4,6 @@
<MicrosoftDiagnosticsRuntimeVersion>0.8.31-beta</MicrosoftDiagnosticsRuntimeVersion>
<MicrosoftDiaSymReaderVersion>1.1.0-beta1-60625-03</MicrosoftDiaSymReaderVersion>
<MicrosoftDiaSymReaderNativeVersion>1.4.0</MicrosoftDiaSymReaderNativeVersion>
<MicrosoftDiaSymReaderPortablePdbVersion>1.2.0-beta1-60706-02</MicrosoftDiaSymReaderPortablePdbVersion>
<MicrosoftDiaSymReaderPortablePdbVersion>1.2.0-beta1-60723-01</MicrosoftDiaSymReaderPortablePdbVersion>
<SystemAppContextVersion>4.1.0</SystemAppContextVersion>
<SystemCollectionsVersion>4.0.11</SystemCollectionsVersion>
......@@ -30,8 +29,8 @@
<SystemNetSocketsVersion>4.1.0</SystemNetSocketsVersion>
<SystemReflectionVersion>4.1.0</SystemReflectionVersion>
<SystemReflectionExtensionsVersion>4.0.1</SystemReflectionExtensionsVersion>
<SystemReflectionPrimitivesVersion>4.0.1</SystemReflectionPrimitivesVersion>
<SystemReflectionMetadataVersion>1.4.1-beta-24322-03</SystemReflectionMetadataVersion>
<SystemReflectionPrimitivesVersion>4.0.1</SystemReflectionPrimitivesVersion>
<SystemReflectionTypeExtensionsVersion>4.1.0</SystemReflectionTypeExtensionsVersion>
<SystemResourcesResourceManagerVersion>4.0.1</SystemResourcesResourceManagerVersion>
<SystemRuntimeVersion>4.1.0</SystemRuntimeVersion>
......@@ -58,4 +57,4 @@
<SystemXmlXmlSerializerVersion>4.0.11</SystemXmlXmlSerializerVersion>
<SystemXmlXPathXDocumentVersion>4.0.1</SystemXmlXPathXDocumentVersion>
</PropertyGroup>
</Project>
</Project>
\ No newline at end of file
......@@ -11,8 +11,8 @@
"Microsoft.CodeAnalysis.VisualBasic": "1.0.0",
"Microsoft.CodeAnalysis.VisualBasic.Workspaces": "1.0.0",
"Microsoft.CodeAnalysis.Workspaces.Common": "1.0.0",
"System.Reflection.Metadata": "1.0.21",
"System.Collections.Immutable": "1.1.36",
"System.Reflection.Metadata": "1.4.1-beta-24322-03",
"System.Collections.Immutable": "1.2.0",
},
"frameworks": {
".NETFramework,Version=v4.6": {}
......
......@@ -129,10 +129,9 @@ internal static bool VerifyTracked(string sourcesPath, IEnumerable<FileName> fil
return allGood;
}
// TODO: Need to include our toolset files not named project.json.
internal static IEnumerable<string> GetProjectJsonFiles(string sourcesPath)
{
return Directory.EnumerateFiles(sourcesPath, "project.json", SearchOption.AllDirectories);
return Directory.EnumerateFiles(sourcesPath, "*project.json", SearchOption.AllDirectories);
}
}
}
......@@ -3,41 +3,14 @@
"Microsoft.Build.Framework": [ "0.1.0-preview-00005", "0.1.0-preview-00023-160527" ],
"Microsoft.Build.Tasks.Core": [ "0.1.0-preview-00005", "0.1.0-preview-00023-160527" ],
"Microsoft.Build.Utilities.Core": [ "0.1.0-preview-00005", "0.1.0-preview-00023-160527" ],
"Microsoft.VisualStudio.Composition": "14.2.19-pre",
"Microsoft.VisualStudio.Data.Core": "9.0.21022",
"Microsoft.VisualStudio.Data.Services": "9.0.21022",
"Microsoft.VisualStudio.Debugger.Engine": [ "14.3.25420", "14.3.25421" ],
"Microsoft.VisualStudio.Debugger.Metadata": [ "14.3.25420", "14.3.25421" ],
"Microsoft.VisualStudio.Designer.Interfaces": "1.1.4322",
"Microsoft.VisualStudio.Editor": "14.3.25407",
"Microsoft.VisualStudio.ImageCatalog": "14.3.25407",
"Microsoft.VisualStudio.Imaging": "14.3.25407",
"Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime": "14.3.25407",
"Microsoft.VisualStudio.Language.Intellisense": [ "14.3.25407", "15.0.25123-Dev15Preview" ],
"Microsoft.VisualStudio.Language.StandardClassification": "14.3.25407",
"Microsoft.VisualStudio.ManagedInterfaces": "8.0.50727",
"Microsoft.VisualStudio.OLE.Interop": "7.10.6070",
"Microsoft.VisualStudio.SDK.EmbedInteropTypes": "14.1.2",
"Microsoft.VisualStudio.Shell.14.0": "14.3.25407",
"Microsoft.VisualStudio.Shell.Design": "14.3.25407",
"Microsoft.VisualStudio.Shell.Interop.10.0": "10.0.30319",
"Microsoft.VisualStudio.Shell.Interop.11.0": "11.0.61030",
"Microsoft.VisualStudio.Shell.Interop.12.1.DesignTime": "12.1.30328",
"Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime": "14.3.25407",
"Microsoft.VisualStudio.Text.Data": "14.3.25407",
"Microsoft.VisualStudio.Text.Logic": "14.3.25407",
"Microsoft.VisualStudio.Text.UI": "14.3.25407",
"Microsoft.VisualStudio.Text.UI.Wpf": "14.3.25407",
"Microsoft.VisualStudio.TextManager.Interop.10.0": "10.0.30319",
"Microsoft.VisualStudio.TextManager.Interop.12.0": "12.0.30110",
"Microsoft.VisualStudio.TextManager.Interop.12.1.DesignTime": "12.1.30328",
"Microsoft.VisualStudio.WCFReference.Interop": "9.0.30729",
"Newtonsoft.Json": [ "6.0.4", "7.0.1", "8.0.2", "9.0.1" ],
"xunit.runner.console": [ "2.1.0", "2.2.0-beta1-build3239" ]
"xunit.runner.console": [ "2.1.0", "2.2.0-beta1-build3239" ],
"Microsoft.VSSDK.BuildTools": [ "14.3.25407", "15.0.25201-Dev15Preview2" ]
},
"toolsetPackages": [
"Microsoft.VSSDK.BuildTools"
],
"generate": {
......
......@@ -37,7 +37,9 @@ internal VerifyCommand(RepoConfig repoConfig, string sourcesPath)
public bool Run(TextWriter writer, string[] args)
{
return VerifyProjectJsonContents(writer);
return
VerifyProjectJsonContents(writer) &&
VerifyRepoConfig(writer);
}
/// <summary>
......@@ -84,5 +86,31 @@ private bool VerifyProjectJsonContents(TextWriter writer)
return allGood;
}
/// <summary>
/// Verify that all of the data contained in the repo configuration is valid. In particular that it hasn't gotten
/// stale and referring to invalid packages.
/// </summary>
/// <param name="writer"></param>
private bool VerifyRepoConfig(TextWriter writer)
{
writer.WriteLine($"Verifying RepoData.json");
var packages = ProjectJsonUtil
.GetProjectJsonFiles(_sourcesPath)
.SelectMany(x => ProjectJsonUtil.GetDependencies(x));
var set = new HashSet<NuGetPackage>(packages);
var allGood = true;
foreach (var package in _repoConfig.FixedPackages)
{
if (!set.Contains(package))
{
writer.WriteLine($"Error: Fixed package {package.Name} - {package.Version} is not used anywhere");
allGood = false;
}
}
return allGood;
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册