-
Notifications
You must be signed in to change notification settings - Fork 4.9k
[release/2.1] Add SuppressMetaPackage to break circular dependency during System.Memory package restore #36550
Conversation
…mory package restore
@@ -2,7 +2,7 @@ | |||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="..\dir.props" /> | |||
<PropertyGroup> | |||
<AssemblyVersion>4.0.1.0</AssemblyVersion> | |||
<AssemblyVersion>4.0.1.1</AssemblyVersion> | |||
<PackageVersion>4.5.1</PackageVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know why there is a PackageVersion
property both here, and in the .pkgproj?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that, but decided to leave it since the pkgproj
overrides it. I am not sure why we have it in both places. It might have been an oversight when it was added to dir.props
in #29925. I don't think it's worth removing, but if you disagree, should we remove it from the pkgproj
and just keep the one in dir.props
(or vice versa)?
That said, we aren't consistent in other places:
corefx/src/System.Threading.Tasks.Extensions/pkg/System.Threading.Tasks.Extensions.pkgproj
Line 9 in 39fcb4b
<PackageVersion>4.5.2</PackageVersion> |
<PackageVersion>4.5.1</PackageVersion> |
cc @tarekgh
See related thread where it was added to the pkgproj
:
#29970 (comment)
@ericstj, can you please help with the packaging failure in CI related to harvesting?
Where is the version |
Version comes from packageIndex. You need to run this target locally and include the change with your PR:
@wtgodbe I thought we were going to automate this? |
I tried running it locally. It didn't update the props file.
Am I missing a step or doing something wrong? |
Looks like that target uses the items already there in order to update. You can add an item then it will be updated. I suppose that target could get the list of package ids from pkgproj s under arc rather than using existing items. Mind fixing it? |
That worked. I added the item manually and it updated to the latest version (i.e.
|
You cannot reference a version you haven’t built yet. |
@@ -2491,14 +2491,16 @@ | |||
"StableVersions": [ | |||
"4.5.0", | |||
"4.5.1", | |||
"4.5.2" | |||
"4.5.2", | |||
"4.5.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has 4.5.3 been built stable yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but I incremented it following the servicing guideline here: https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/library-servicing.md#determine-packageversion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Maybe that document should explicitly call out that StableVersion
should not be changed until after you've shipped the stable release. StableVersion
list represents history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahsonkhan this change still needs to be removed before I can merge this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks.
I haven't done this yet, looks like I forgot to create an issue. https://github.com/dotnet/corefx/issues/36570 |
Looks like we are hitting https://github.com/dotnet/corefx/issues/28551 for .NET Core 1.0
Do we have a workaround or fix?
|
Do this: 5f26635 |
@dotnet-bot test NETFX x86 Release Build |
@dotnet-bot test Windows x86 Release Build |
Test failures are only because Fedora 27 queue was removed and they can be ignored. |
Approved for 2.1.11 and 2.2.5.
|
Is this a known failure? |
Since the branch is now open, removing the no merge label. |
The test failure in CI for linux is a known issue: https://github.com/dotnet/corefx/issues/34675 Centos.7.Amd64.Open-x64-Release
|
Description
System.Memory
depends on theNetStandard.Library
meta-package, particularly on netstandard1.1 (see https://www.nuget.org/packages/System.Memory/4.5.2).Whenever libraries that make up the meta-package try to reference/depend on
System.Memory
, it ends up creating a circular dependency which causes package restore to fail. This change makes it such thatSystem.Memory
does not referenceNETStandard.Library
(meta-package) but instead references the constituent System.* packages.Customer Impact
This issue surfaced recently when
System.Diagnostics.DiagnosticSource
was trying to referenceSystem.Memory
to add new span-based APIs (and theNetStandard.Library
meta-package includes this package in its closure - viaSystem.Net.Http
) . This results in applications consuming such library to fail on package restore (see #33207):System.Diagnostics.DiagnosticSource
has customers (such as App Insights) who depend on this new functionality (and need to run on netstandard1.x/2.0 compatible frameworks). The pkgproj contains a temporary workaround as a stop gap:corefx/src/System.Diagnostics.DiagnosticSource/pkg/System.Diagnostics.DiagnosticSource.pkgproj
Lines 21 to 35 in ccb68c0
Regression?
No
Packaging reviewed?
System.Diagnostics.DiagnosticSource
(that references the fixedSystem.Memory
package) from a console app targeting netcoreapp1.1. The package restore was successful and we no longer have the cycle.cc @ericstj, @wtgodbe, @safern
Risk
Low. We have made similar fixes before to break the circular dependency (for example for
System.Runtime.CompilerServices.Unsafe
- #28042).