Skip to content

Add references to newtonsoft.json for transitive version pinning #10126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

riarenas
Copy link
Member

@riarenas riarenas commented Jul 22, 2022

part of #10101

Adds references to newtonsoft.json everywhere we need to control transitive pinning.

Running https://dev.azure.com/dnceng/internal/_build/results?buildId=1898566&view=results to see what CG thinks of these changes and whether they are enough.

A lot of the older versions we get through msbuild, which seems like too big of a dependency to just update everywhere, which makes me think the direct references are the best way to go to get this sorted.

To double check:

@riarenas riarenas requested review from garath and MattGal July 22, 2022 21:19
@riarenas
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@riarenas
Copy link
Member Author

@riarenas
Copy link
Member Author

latest test build is finding some references to 9.0.1 that I can't quite track

@riarenas
Copy link
Member Author

I think the last few references are coming from the test sdk. There's a newer version uploaded to solve their own newtonsoft dependency issues: https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/17.4.0-preview-20220707-01#dependencies-body-tab

Upgrading from our current version means we'll have to update some other dependencies, (or make sure to add newtonsoft references to every test project in the repo) so that might be better left as a separate PR.

\src\Microsoft.DotNet.VersionTools.Tasks.Tests\Microsoft.DotNet.VersionTools.Tasks.Tests.csproj : error NU
1605: Detected package downgrade: NuGet.Frameworks from 5.11.0 to 5.6.0-preview.2.6489. Reference the package directly
from the project to select a different version.  [\Arcade.sln]
\src\Microsoft.DotNet.VersionTools.Tasks.Tests\Microsoft.DotNet.VersionTools.Tasks.Tests.csproj : error NU
1605:  Microsoft.DotNet.VersionTools.Tasks.Tests -> Microsoft.NET.Test.Sdk 17.4.0-preview-20220707-01 -> Microsoft.Test
Platform.TestHost 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.ObjectModel 17.4.0-preview-20220707-01 -> NuGet.
Frameworks (>= 5.11.0)  [\Arcade.sln]
\src\Microsoft.DotNet.VersionTools.Tasks.Tests\Microsoft.DotNet.VersionTools.Tasks.Tests.csproj : error NU
1605:  Microsoft.DotNet.VersionTools.Tasks.Tests -> NuGet.Frameworks (>= 5.6.0-preview.2.6489) [\Arcade.sl
n]
\src\Microsoft.DotNet.SourceBuild\tests\Microsoft.DotNet.SourceBuild.Tasks.Tests.csproj : error NU1605: De
tected package downgrade: NuGet.Frameworks from 5.11.0 to 5.6.0-preview.2.6489. Reference the package directly from the
 project to select a different version.  [\Arcade.sln]
\src\Microsoft.DotNet.SourceBuild\tests\Microsoft.DotNet.SourceBuild.Tasks.Tests.csproj : error NU1605:  M
icrosoft.DotNet.SourceBuild.Tasks.Tests -> Microsoft.NET.Test.Sdk 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.
TestHost 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.ObjectModel 17.4.0-preview-20220707-01 -> NuGet.Framework
s (>= 5.11.0)  [\Arcade.sln]
\src\Microsoft.DotNet.SourceBuild\tests\Microsoft.DotNet.SourceBuild.Tasks.Tests.csproj : error NU1605:  M
icrosoft.DotNet.SourceBuild.Tasks.Tests -> NuGet.Frameworks (>= 5.6.0-preview.2.6489) [\Arcade.sln]
\src\Microsoft.DotNet.PackageTesting.Tests\Microsoft.DotNet.PackageTesting.Tests.csproj : error NU1605: De
tected package downgrade: NuGet.Frameworks from 5.11.0 to 5.6.0-preview.2.6489. Reference the package directly from the
 project to select a different version.  [\Arcade.sln]
\src\Microsoft.DotNet.PackageTesting.Tests\Microsoft.DotNet.PackageTesting.Tests.csproj : error NU1605:  M
icrosoft.DotNet.PackageTesting.Tests -> Microsoft.NET.Test.Sdk 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.Tes
tHost 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.ObjectModel 17.4.0-preview-20220707-01 -> NuGet.Frameworks (
>= 5.11.0)  [\Arcade.sln]
\src\Microsoft.DotNet.PackageTesting.Tests\Microsoft.DotNet.PackageTesting.Tests.csproj : error NU1605:  M
icrosoft.DotNet.PackageTesting.Tests -> NuGet.Frameworks (>= 5.6.0-preview.2.6489) [\Arcade.sln]
    0 Warning(s)
    3 Error(s)

Copy link
Member

@MattGal MattGal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I assume you've built locally and checked out the package cache too?

@AlitzelMendez
Copy link
Member

I talked with Ricardo and I am going to merge this pr to handle the other alerts in other pr

@AlitzelMendez AlitzelMendez merged commit 5d3e421 into dotnet:main Jul 25, 2022
am11 pushed a commit to am11/arcade that referenced this pull request Jul 26, 2022
…net#10126)

* Add references to newtonsoft.json for transitive version pinning

* but wait.. there's more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants