diff --git a/.gitmodules b/.gitmodules index e8c4effa7e..76458daf89 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,26 +22,10 @@ path = modules/BrowserLink url = https://github.com/aspnet/BrowserLink.git branch = release/2.1 -[submodule "modules/Caching"] - path = modules/Caching - url = https://github.com/aspnet/Caching.git - branch = release/2.1 -[submodule "modules/Common"] - path = modules/Common - url = https://github.com/aspnet/Common.git - branch = release/2.1 -[submodule "modules/Configuration"] - path = modules/Configuration - url = https://github.com/aspnet/Configuration.git - branch = release/2.1 [submodule "modules/CORS"] path = modules/CORS url = https://github.com/aspnet/CORS.git branch = release/2.1 -[submodule "modules/DependencyInjection"] - path = modules/DependencyInjection - url = https://github.com/aspnet/DependencyInjection.git - branch = release/2.1 [submodule "modules/Diagnostics"] path = modules/Diagnostics url = https://github.com/aspnet/Diagnostics.git @@ -54,14 +38,6 @@ path = modules/EntityFrameworkCore url = https://github.com/aspnet/EntityFrameworkCore.git branch = release/2.1 -[submodule "modules/EventNotification"] - path = modules/EventNotification - url = https://github.com/aspnet/EventNotification.git - branch = release/2.1 -[submodule "modules/FileSystem"] - path = modules/FileSystem - url = https://github.com/aspnet/FileSystem.git - branch = release/2.1 [submodule "modules/Hosting"] path = modules/Hosting url = https://github.com/aspnet/Hosting.git @@ -102,10 +78,6 @@ path = modules/Localization url = https://github.com/aspnet/Localization.git branch = release/2.1 -[submodule "modules/Logging"] - path = modules/Logging - url = https://github.com/aspnet/Logging.git - branch = release/2.1 [submodule "modules/MetaPackages"] path = modules/MetaPackages url = https://github.com/aspnet/MetaPackages.git @@ -122,10 +94,6 @@ path = modules/MvcPrecompilation url = https://github.com/aspnet/MvcPrecompilation.git branch = release/2.1 -[submodule "modules/Options"] - path = modules/Options - url = https://github.com/aspnet/Options.git - branch = release/2.1 [submodule "modules/Razor"] path = modules/Razor url = https://github.com/aspnet/Razor.git @@ -166,7 +134,3 @@ path = modules/Templating url = https://github.com/aspnet/Templating.git branch = release/2.1 -[submodule "modules/Testing"] - path = modules/Testing - url = https://github.com/aspnet/Testing.git - branch = release/2.1 diff --git a/build/GenerateCode.targets b/build/GenerateCode.targets deleted file mode 100644 index 069e358ae6..0000000000 --- a/build/GenerateCode.targets +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/build/artifacts.props b/build/artifacts.props index 39b35505e6..a4ec6e8774 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -51,9 +51,7 @@ - - @@ -156,7 +154,6 @@ - @@ -183,40 +180,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -225,32 +192,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/buildorder.props b/build/buildorder.props index fdc4e89b0f..1cb0f6cec8 100644 --- a/build/buildorder.props +++ b/build/buildorder.props @@ -7,18 +7,9 @@ - - - - - - - - - - - - + + + diff --git a/build/dependencies.props b/build/dependencies.props index 7de10ef40d..d906e02d29 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,9 +2,9 @@ - 2.1.6-servicing-27017-02 - 2.1.6-servicing-27017-02 - + 2.1.6 + 2.1.6 + @@ -19,6 +19,68 @@ + + 2.1.6 + 2.1.6 + 2.1.0 + 2.1.1 + 2.1.2 + 2.1.2 + 2.1.2 + 2.1.2 + 2.1.6 + 2.1.6 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.6 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.6 + 2.1.1 + 0.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.6 + 2.1.6 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.6 + 2.1.6 + 2.1.6 + 2.1.6 + 2.1.6 + 2.1.6 + 2.1.6 + 2.1.6 + 2.1.6 + 2.1.6 + + 0.9.9 0.10.13 4.2.1 diff --git a/build/external-dependencies.props b/build/external-dependencies.props index 8f8858d98c..d9edeee7cf 100644 --- a/build/external-dependencies.props +++ b/build/external-dependencies.props @@ -10,9 +10,85 @@ false + + + + + + + false + + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/repo.targets b/build/repo.targets index 076c50232e..cde696935c 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -5,7 +5,6 @@ - diff --git a/build/submodules.props b/build/submodules.props index 4064fe8af9..8b30d5efcb 100644 --- a/build/submodules.props +++ b/build/submodules.props @@ -53,17 +53,11 @@ - - - - - - @@ -74,10 +68,8 @@ - - @@ -85,7 +77,6 @@ - diff --git a/build/tasks/AnalyzeBuildGraph.cs b/build/tasks/AnalyzeBuildGraph.cs index a7193d7735..c70d1d8a56 100644 --- a/build/tasks/AnalyzeBuildGraph.cs +++ b/build/tasks/AnalyzeBuildGraph.cs @@ -111,16 +111,26 @@ namespace RepoTasks var dependencyMap = new Dictionary>(StringComparer.OrdinalIgnoreCase); foreach (var dep in Dependencies) { - if (!dependencyMap.TryGetValue(dep.ItemSpec, out var versions)) + if (dep.GetMetadata("IsExtensionsPackage") == "true") { - dependencyMap[dep.ItemSpec] = versions = new List(); + buildPackageMap.Add(dep.ItemSpec, new ArtifactInfo.Package + { + PackageInfo = new PackageInfo(dep.ItemSpec, new NuGetVersion(dep.GetMetadata("Version")), null, null), + }); } - - versions.Add(new ExternalDependency + else { - PackageId = dep.ItemSpec, - Version = dep.GetMetadata("Version"), - }); + if (!dependencyMap.TryGetValue(dep.ItemSpec, out var versions)) + { + dependencyMap[dep.ItemSpec] = versions = new List(); + } + + versions.Add(new ExternalDependency + { + PackageId = dep.ItemSpec, + Version = dep.GetMetadata("Version"), + }); + } } var inconsistentVersions = new List(); diff --git a/build/tasks/CodeGen/DirectedGraphXml.cs b/build/tasks/CodeGen/DirectedGraphXml.cs deleted file mode 100644 index e90d66ca6b..0000000000 --- a/build/tasks/CodeGen/DirectedGraphXml.cs +++ /dev/null @@ -1,42 +0,0 @@ - -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Xml.Linq; - -namespace RepoTasks.CodeGen -{ - class DirectedGraphXml - { - private readonly XNamespace _ns = "http://schemas.microsoft.com/vs/2009/dgml"; - private readonly XDocument _doc; - private readonly XElement _nodes; - private readonly XElement _links; - - public DirectedGraphXml() - { - _doc = new XDocument(new XElement(_ns + "DirectedGraph")); - _nodes = new XElement(_ns + "Nodes"); - _links = new XElement(_ns + "Links"); - _doc.Root.Add(_nodes); - _doc.Root.Add(_links); - } - - public void AddNode(string id) - { - _nodes.Add(new XElement(_ns + "Node", new XAttribute("Id", id), new XAttribute("Label", id))); - } - - public void AddLink(string source, string target) - { - _links.Add(new XElement(_ns + "Link", - new XAttribute("Source", source), - new XAttribute("Target", target))); - } - - public void Save(string path) - { - _doc.Save(path); - } - } -} diff --git a/build/tasks/CodeGen/GenerateSubmoduleGraph.cs b/build/tasks/CodeGen/GenerateSubmoduleGraph.cs deleted file mode 100644 index 7940b5cba2..0000000000 --- a/build/tasks/CodeGen/GenerateSubmoduleGraph.cs +++ /dev/null @@ -1,226 +0,0 @@ - -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.IO; -using System.Text; -using System.Threading; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using NuGet.Frameworks; -using NuGet.Versioning; -using RepoTools.BuildGraph; -using RepoTasks.ProjectModel; -using RepoTasks.Utilities; -using RepoTasks.CodeGen; -using NuGet.Packaging.Core; - -namespace RepoTasks -{ - public class GenerateSubmoduleGraph : Task, ICancelableTask - { - private readonly CancellationTokenSource _cts = new CancellationTokenSource(); - - /// - /// Repositories that we are building new versions of. - /// - [Required] - public ITaskItem[] Solutions { get; set; } - - [Required] - public ITaskItem[] Artifacts { get; set; } - - [Required] - public ITaskItem[] Repositories { get; set; } - - [Required] - public string RepositoryRoot { get; set; } - - [Required] - public string Properties { get; set; } - - public void Cancel() - { - _cts.Cancel(); - } - - public override bool Execute() - { - var packageArtifacts = Artifacts.Select(ArtifactInfo.Parse) - .OfType() - .Where(p => !p.IsSymbolsArtifact) - .ToDictionary(p => p.PackageInfo.Id, p => p, StringComparer.OrdinalIgnoreCase); - - var factory = new SolutionInfoFactory(Log, BuildEngine5); - var props = MSBuildListSplitter.GetNamedProperties(Properties); - - Log.LogMessage(MessageImportance.High, $"Beginning cross-repo analysis on {Solutions.Length} solutions. Hang tight..."); - - if (!props.TryGetValue("Configuration", out var defaultConfig)) - { - defaultConfig = "Debug"; - } - - var solutions = factory.Create(Solutions, props, defaultConfig, _cts.Token).OrderBy(f => f.Directory).ToList(); - Log.LogMessage($"Found {solutions.Count} and {solutions.Sum(p => p.Projects.Count)} projects"); - - if (_cts.IsCancellationRequested) - { - return false; - } - - return GenerateGraph(packageArtifacts, solutions); - } - - private bool GenerateGraph(IDictionary packageArtifacts, IReadOnlyList solutions) - { - var repoGraph = new AdjacencyMatrix(solutions.Count); - var packageToProjectMap = new Dictionary(); - - for (var i = 0; i < solutions.Count; i++) - { - var sln = repoGraph[i] = solutions[i]; - - foreach (var proj in sln.Projects) - { - if (!proj.IsPackable || proj.FullPath.Contains("samples")) - { - continue; - } - - var id = new PackageIdentity(proj.PackageId, new NuGetVersion(proj.PackageVersion)); - - if (packageToProjectMap.TryGetValue(id, out var otherProj)) - { - Log.LogError($"Both {proj.FullPath} and {otherProj.FullPath} produce {id}"); - continue; - } - - packageToProjectMap.Add(id, proj); - } - - var sharedSrc = Path.Combine(sln.Directory, "shared"); - if (Directory.Exists(sharedSrc)) - { - foreach (var dir in Directory.GetDirectories(sharedSrc, "*.Sources")) - { - var id = Path.GetFileName(dir); - var artifactInfo = packageArtifacts[id]; - var sharedSrcProj = new ProjectInfo(dir, - Array.Empty(), - Array.Empty(), - true, - artifactInfo.PackageInfo.Id, - artifactInfo.PackageInfo.Version.ToNormalizedString()); - sharedSrcProj.SolutionInfo = sln; - var identity = new PackageIdentity(artifactInfo.PackageInfo.Id, artifactInfo.PackageInfo.Version); - packageToProjectMap.Add(identity, sharedSrcProj); - } - } - } - - if (Log.HasLoggedErrors) - { - return false; - } - - for (var i = 0; i < solutions.Count; i++) - { - var sln = repoGraph[i]; - - var deps = from proj in sln.Projects - from tfm in proj.Frameworks - from dep in tfm.Dependencies.Values - select dep; - - foreach (var dep in deps) - { - if (packageToProjectMap.TryGetValue(new PackageIdentity(dep.Id, new NuGetVersion(dep.Version)), out var target)) - { - var j = repoGraph.FindIndex(target.SolutionInfo); - repoGraph.SetLink(i, j); - } - } - - var toolDeps = from proj in sln.Projects - from tool in proj.Tools - select tool; - - foreach (var toolDep in toolDeps) - { - if (packageToProjectMap.TryGetValue(new PackageIdentity(toolDep.Id, new NuGetVersion(toolDep.Version)), out var target)) - { - var j = repoGraph.FindIndex(target.SolutionInfo); - repoGraph.SetLink(i, j); - } - } - } - - CreateDgml(repoGraph); - return !Log.HasLoggedErrors; - } - - - private void CreateDgml(AdjacencyMatrix repoGraph) - { - var dgml = new DirectedGraphXml(); - - for (var i = 0; i < repoGraph.Count; i++) - { - var node = repoGraph[i]; - var nodeName = Path.GetFileName(node.Directory); - dgml.AddNode(nodeName); - - for (var j = 0; j < repoGraph.Count; j++) - { - if (j == i) continue; - if (repoGraph.HasLink(i, j)) - { - var target = repoGraph[j]; - var targetName = Path.GetFileName(target.Directory); - dgml.AddLink(nodeName, targetName); - } - } - } - - dgml.Save(Path.Combine(RepositoryRoot, "modules", "SubmoduleGraph.dgml")); - } - - private class AdjacencyMatrix - { - private readonly bool[,] _matrix; - private readonly SolutionInfo[] _items; - - public AdjacencyMatrix(int size) - { - _matrix = new bool[size, size]; - _items = new SolutionInfo[size]; - Count = size; - } - - public SolutionInfo this[int idx] - { - get => _items[idx]; - set => _items[idx] = value; - } - - public int FindIndex(SolutionInfo item) - { - return Array.FindIndex(_items, t => t.Equals(item)); - } - - public int Count { get; } - - public bool HasLink(int source, int target) => _matrix[source, target]; - - public void SetLink(int source, int target) - { - _matrix[source, target] = true; - } - } - } -} diff --git a/build/tasks/CodeGen/RepositoryProject.cs b/build/tasks/CodeGen/RepositoryProject.cs deleted file mode 100644 index 1cb3b76391..0000000000 --- a/build/tasks/CodeGen/RepositoryProject.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.IO; -using System.Text; -using Microsoft.Build.Construction; -using Microsoft.Build.Evaluation; - -namespace RepoTasks.CodeGen -{ - class RepositoryProject - { - private readonly ProjectRootElement _doc; - - public RepositoryProject(string repositoryRoot) - { - _doc = ProjectRootElement.Create(NewProjectFileOptions.None); - var import = _doc.CreateImportElement(@"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"); - var propGroup = _doc.AddPropertyGroup(); - if (repositoryRoot[repositoryRoot.Length - 1] != '\\') - { - repositoryRoot += '\\'; - } - propGroup.AddProperty("RepositoryRoot", repositoryRoot); - _doc.AddItemGroup(); - _doc.PrependChild(import); - _doc.AddImport(@"$(MSBuildToolsPath)\Microsoft.Common.targets"); - } - - public void AddProjectReference(string path) - { - _doc.AddItem("ProjectReference", path); - } - - public void AddProperty(string name, string value) - { - _doc.AddProperty(name, value); - } - - public void Save(string filePath) - { - _doc.Save(filePath, Encoding.UTF8); - } - } -} diff --git a/build/tasks/RepoTasks.tasks b/build/tasks/RepoTasks.tasks index 1339fcba27..2c2f8d48af 100644 --- a/build/tasks/RepoTasks.tasks +++ b/build/tasks/RepoTasks.tasks @@ -10,7 +10,6 @@ - diff --git a/modules/Caching b/modules/Caching deleted file mode 160000 index ced279b071..0000000000 --- a/modules/Caching +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ced279b071920f055a309cd81acc333780ef2bf4 diff --git a/modules/Common b/modules/Common deleted file mode 160000 index 975fcf3026..0000000000 --- a/modules/Common +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 975fcf302632a83059086cd8faabb92379f09d02 diff --git a/modules/Configuration b/modules/Configuration deleted file mode 160000 index ef29dc86b9..0000000000 --- a/modules/Configuration +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ef29dc86b970893147fd2a27d527f5a907af9fdd diff --git a/modules/DependencyInjection b/modules/DependencyInjection deleted file mode 160000 index 7a283947c2..0000000000 --- a/modules/DependencyInjection +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7a283947c231b6585c8ac95e653950b660f3da96 diff --git a/modules/EventNotification b/modules/EventNotification deleted file mode 160000 index 69d9ba1300..0000000000 --- a/modules/EventNotification +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 69d9ba130050107409fc5c3d9d834ca55fc7a95d diff --git a/modules/FileSystem b/modules/FileSystem deleted file mode 160000 index baebb8b0c6..0000000000 --- a/modules/FileSystem +++ /dev/null @@ -1 +0,0 @@ -Subproject commit baebb8b0c672ab37bac72d7196da1b919d362cc5 diff --git a/modules/Logging b/modules/Logging deleted file mode 160000 index 8270c54522..0000000000 --- a/modules/Logging +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8270c545224e8734d7297e54edef5c584ee82f01 diff --git a/modules/Options b/modules/Options deleted file mode 160000 index 2ea21ace21..0000000000 --- a/modules/Options +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ea21ace21105df2839766a5f13e8e2636b7fc41 diff --git a/modules/SubmoduleGraph.dgml b/modules/SubmoduleGraph.dgml deleted file mode 100644 index cdcd0a92cd..0000000000 --- a/modules/SubmoduleGraph.dgml +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/Testing b/modules/Testing deleted file mode 160000 index 8639233365..0000000000 --- a/modules/Testing +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8639233365b85997c7e0b97b50f23aaddd36f671 diff --git a/scripts/UpdateDependencies.ps1 b/scripts/UpdateDependencies.ps1 index f8bfdac4fb..4ecb207047 100755 --- a/scripts/UpdateDependencies.ps1 +++ b/scripts/UpdateDependencies.ps1 @@ -54,10 +54,8 @@ foreach ($package in $remoteDeps.SelectNodes('//Package')) { } } - -$currentBranch = Invoke-Block { & git rev-parse --abbrev-ref HEAD } - if (-not $NoCommit) { + $currentBranch = Invoke-Block { & git rev-parse --abbrev-ref HEAD } $destinationBranch = "dotnetbot/UpdateDeps" Invoke-Block { & git checkout -tb $destinationBranch "origin/$GithubUpstreamBranch" } } @@ -74,5 +72,7 @@ try { } } finally { - Invoke-Block { & git checkout $currentBranch } + if (-not $NoCommit) { + Invoke-Block { & git checkout $currentBranch } + } }