diff --git a/build/dependencies.props b/build/dependencies.props index c5d8370df2..93fa713183 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -132,7 +132,7 @@ - + @@ -253,4 +253,75 @@ KRB2004 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json + + + + + + + + + + + + + + + + + + + diff --git a/build/repo.targets b/build/repo.targets index 1aa7ad2e18..07d6aad469 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -48,7 +48,6 @@ <_LineupPackages Include="@(ExternalDependency)" /> <_LineupPackages Include="%(ArtifactInfo.PackageId)" Version="%(ArtifactInfo.Version)" Condition=" '%(ArtifactInfo.ArtifactType)' == 'NuGetPackage' " /> - <_LineupPackages Include="%(ShippedArtifactInfo.PackageId)" Version="%(ShippedArtifactInfo.Version)" Condition=" '%(ShippedArtifactInfo.ArtifactType)' == 'NuGetPackage' " /> <_LineupSources Include="$(_DependencyPackagesDirectory)" Condition="'$(_DependencyPackagesDirectory)' != '' AND Exists('$(_DependencyPackagesDirectory)')" /> <_LineupSources Include="$(BuildDir)" /> @@ -200,7 +199,6 @@ Solutions="@(Solution)" Artifacts="@(ArtifactInfo)" Dependencies="@(ExternalDependency)" - ShippedArtifacts="@(ShippedArtifactInfo)" StartGraphAt="$(BuildGraphOf)" Properties="Configuration=$(Configuration);BuildNumber=$(BuildNumber);DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath)"> diff --git a/build/tasks/AnalyzeBuildGraph.cs b/build/tasks/AnalyzeBuildGraph.cs index 3a7a6a3ded..d72fd62fc4 100644 --- a/build/tasks/AnalyzeBuildGraph.cs +++ b/build/tasks/AnalyzeBuildGraph.cs @@ -34,10 +34,6 @@ namespace RepoTasks [Required] public ITaskItem[] Dependencies { get; set; } - // Artifacts that already shipped from repos - [Required] - public ITaskItem[] ShippedArtifacts { get; set; } - [Required] public string Properties { get; set; } @@ -90,12 +86,6 @@ namespace RepoTasks private void EnsureConsistentGraph(IEnumerable packages, IEnumerable solutions) { - var shippedPackageMap = ShippedArtifacts - .Select(ArtifactInfo.Parse) - .OfType() - .Where(p => !p.IsSymbolsArtifact) - .ToDictionary(p => p.PackageInfo.Id, p => p, StringComparer.OrdinalIgnoreCase); - // ensure versions cascade var buildPackageMap = packages.ToDictionary(p => p.PackageInfo.Id, p => p, StringComparer.OrdinalIgnoreCase); var dependencyMap = new Dictionary>(StringComparer.OrdinalIgnoreCase); @@ -126,27 +116,8 @@ namespace RepoTasks if (!buildPackageMap.TryGetValue(dependency.Key, out var package)) { // This dependency is not one of the packages that will be compiled by this run of Universe. - - var matchesExternalDependency = false; - if (shippedPackageMap.TryGetValue(dependency.Key, out var shippedPackage)) - { - if (string.IsNullOrEmpty(dependency.Value.Version)) - { - Log.LogKoreBuildError( - project.FullPath, - KoreBuildErrors.EmptyPackageReferenceVersion, - message: $"Package reference to {dependency.Key} has an empty version"); - continue; - } - - matchesExternalDependency = shippedPackage.PackageInfo.Version.Equals(NuGetVersion.Parse(dependency.Value.Version)); - } - else if (dependencyMap.TryGetValue(dependency.Key, out var externalVersions)) - { - matchesExternalDependency = externalVersions.Contains(dependency.Value.Version); - } - - if (!matchesExternalDependency) + if (!dependencyMap.TryGetValue(dependency.Key, out var externalVersions) + || !externalVersions.Contains(dependency.Value.Version)) { Log.LogKoreBuildError( project.FullPath, @@ -168,15 +139,7 @@ namespace RepoTasks if (!solution.ShouldBuild) { - if (!shippedPackageMap.TryGetValue(project.PackageId, out _)) - { - Log.LogMessage(MessageImportance.Normal, $"Detected inconsistent in a sample or test project {project.FullPath}"); - continue; - } - else - { - reposThatShouldPatch.Add(Path.GetFileName(Path.GetDirectoryName(solution.FullPath))); - } + reposThatShouldPatch.Add(Path.GetFileName(Path.GetDirectoryName(solution.FullPath))); } inconsistentVersions.Add(new VersionMismatch