azure-sdk-for-net
azure-sdk-for-net copied to clipboard
Upgrade packages in Packages.Data.Props
This needs to be done is phases because the pipelines are not happy to have them done all at once:
- [x] Microsoft.Bcl.AsyncInterfaces and System.Text.Encodings.Web
- [x] System.Text.Json
- [x] System.Diagnostics.DiagnosticSource, System.Threading.Tasks.Extensions, System.Numerics.Vectors
- [x] System.Memory.Data
- [ ] Upgrade the rest
How about adding a net8.0 target next to the netstandard2.0 and remove all those packages there? These System.Memory.Data, Microsoft.Bcl.AsyncInterfaces 6.0.0 and System.Text.Json 6.0.10 packages are still there for any project running net8.0. And issues like these have been going on forever.
If I install Azure.Identity or Azure.Core for that matter, in a net8.0 project I don't want to see this enormous list of crap being pulled in.
@svrooij this is already done in Azure.Core versions 1.45.0 and above - https://www.nuget.org/packages/Azure.Core/1.45.0#dependencies-body-tab. Since the recent identity releases have all been beta releases, to see this in your app you can take a direct dependency on the latest version of Azure.Core to hoist the version
All Azure SDK libraries have net8.0 targets in the source code. If they haven't been released in the last 6 months then they might not have the new target released in the actual nuget package. If there's a specific library that's blocking you that hasn't been released with the net8.0 target, please open an issue so the team owning that package can be aware.
System.Memory.Data will always need to be a dependency since it's NOT built into the runtime. Microsoft.Bcl.AsyncInterfaces will also need to be a dependency at least for the foreseeable future because of https://github.com/dotnet/runtime/issues/115124 and the strong backwards compatibility guarantees with all Azure SDK packages.
@svrooij this is already done in Azure.Core versions 1.45.0 and above - https://www.nuget.org/packages/Azure.Core/1.45.0#dependencies-body-tab. Since the recent identity releases have all been beta releases, to see this in your app you can take a direct dependency on the latest version of Azure.Core to hoist the version
All Azure SDK libraries have net8.0 targets in the source code. If they haven't been released in the last 6 months then they might not have the new target released in the actual nuget package. If there's a specific library that's blocking you that hasn't been released with the net8.0 target, please open an issue so the team owning that package can be aware.
System.Memory.Data will always need to be a dependency since it's NOT built into the runtime. Microsoft.Bcl.AsyncInterfaces will also need to be a dependency at least for the foreseeable future because of dotnet/runtime#115124 and the strong backwards compatibility guarantees with all Azure SDK packages.
But why is System.Memory listed for the .NET 8 target on Azure.Identity? That package is included in the runtime.
[System.Memory](https://www.nuget.org/packages/System.Memory/) (>= 4.5.5)
https://www.nuget.org/packages/Azure.Identity/1.14.0#dependencies-body-tab
And latest Azure.Core need minimum
[System.Memory.Data](https://www.nuget.org/packages/System.Memory.Data/) (>= 6.0.1)
https://www.nuget.org/packages/Azure.Core/1.46.1#dependencies-body-tab
Why isn't that bumped up to the latest 8.x version? (Oh looks like https://github.com/Azure/azure-sdk-for-net/pull/49685 hasn't been used to build a new Azure.Core yet maybe? Surprised not even a beta version though)
@Frulfump Ah I may have just missed that one, it's coming from System.ClientModel. I'll see about removing that one as well.
In regards to System.Memory.Data, there were a couple big changes between those two package versions. It broke some tests in very weird ways that took a bit for me to figure out. It will go out in a release soon.
@m-redding Nice that would be great!
Ah I see, that's great news! Thanks for working on this!
Maybe this should be updated in the Directory.Build.Common.targets? To include System.Memory?
<!-- Remove packages built into the .NET 6+ runtime -->
<PackageReference Remove="System.Buffers" />
<PackageReference Remove="System.Diagnostics.DiagnosticSource" />
<PackageReference Remove="System.Net.Http" />
<PackageReference Remove="System.Numerics.Vectors" />
<PackageReference Remove="System.Text.Encodings.Web" />
<PackageReference Remove="System.Text.Json" />
<PackageReference Remove="System.Threading.Channels" />
<PackageReference Remove="System.Threading.Tasks.Extensions" />
https://github.com/Azure/azure-sdk-for-net/blob/25250c4257d188fb0cc683531f3dbfc0071ca2ef/eng/Directory.Build.Common.targets#L104C1-L104C58
I guess you will see NU1510 warnings when you build with .NET 10+ SDKs https://learn.microsoft.com/en-gb/dotnet/core/compatibility/sdk/10.0/nu1510-pruned-references Could be a nice way to find these cases early.
@Frulfump fixed in https://github.com/Azure/azure-sdk-for-net/pull/50576
System.ClientModel 1.5.0 was just GA:d and now bumps the System.Memory.Data dependency to 8.0.1 https://github.com/Azure/azure-sdk-for-net/releases/tag/System.ClientModel_1.5.0 https://www.nuget.org/packages/System.ClientModel/1.5.0
Can Azure.Core be updated to use System.ClientModel 1.5.0 now or is there more things to do? When is it planned (rough estimate is fine) that a new version of Azure.Identity will GA that contains the removal of System.Memory fixed in #50576?
A new version of Azure.Core was just released that uses System.ClientModel 1.5.0 https://github.com/Azure/azure-sdk-for-net/releases/tag/Azure.Core_1.47.0 ~Not indexed by NuGet yet https://www.nuget.org/packages/Azure.Core#versions-body-tab~ Indexed now, opened #51161 to track that discrepancy
Azure.Identity 1.15.0-beta.1 was just released ~7 hours ago that removes the unnecessary reference to System.Memory https://github.com/Azure/azure-sdk-for-net/releases/tag/Azure.Identity_1.15.0-beta.1
Based on historic data the GA version should release within 2-3 months but hopefully sooner https://www.nuget.org/packages/Azure.Identity/#versions-body-tab
From the main issue what's covered in the "Upgrade the rest" todo?