Skip to content
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

Use live dependencies for netcoreapp3.0 depencies (#48176) #48344

Merged
merged 5 commits into from
Mar 13, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@

<PropertyGroup>
<NoWarn>$(NoWarn);PKG0001</NoWarn>
<PackageVersion>5.0.1</PackageVersion>
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.1</AssemblyVersion>
<SkipValidatePackage>true</SkipValidatePackage>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
$(TargetFramework.StartsWith('net4'))">
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj" />
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
</ItemGroup>

<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<PackageVersion>5.0.1</PackageVersion>
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.1</AssemblyVersion>
<SkipValidatePackage>true</SkipValidatePackage>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or
$(TargetFramework.StartsWith('net4'))">
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
</ItemGroup>

<!-- NetCoreApp3.0 needs to use the same version of dependencies as .NETStandard. -->
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<PackageVersion>5.0.1</PackageVersion>
<AssemblyVersion>5.0.0.1</AssemblyVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,9 @@
'$(TargetFramework)' == 'netcoreapp3.0'">
<Reference Include="System.Collections" />
<Reference Include="System.Collections.Concurrent" />
<Reference Include="System.Collections.Immutable" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.IO.FileSystem" />
<Reference Include="System.Memory" />
<Reference Include="System.Reflection.Metadata" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
Expand All @@ -163,8 +161,22 @@
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) or
$(TargetFramework.StartsWith('net4'))">
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Immutable\src\System.Collections.Immutable.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
</ItemGroup>

<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
<Choose>
<When Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ItemGroup>
<Reference Include="System.Collections.Immutable" />
<Reference Include="System.Reflection.Metadata" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Immutable\src\System.Collections.Immutable.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
</ItemGroup>
</Otherwise>
</Choose>
</Project>
4 changes: 2 additions & 2 deletions src/libraries/System.Text.Json/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<PackageVersion>5.0.1</PackageVersion>
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.1</AssemblyVersion>
<PackageVersion>5.0.2</PackageVersion>
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">5.0.0.2</AssemblyVersion>
<SkipValidatePackage>true</SkipValidatePackage>
Copy link
Member Author

Choose a reason for hiding this comment

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

@Anipik is that setting intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Found out that this is necessary when incrementing the assembly version for only a subset of supported TargetFrameworks. Unfortunately the servicing docs don't mention that.

</PropertyGroup>
</Project>
19 changes: 16 additions & 3 deletions src/libraries/System.Text.Json/src/System.Text.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,8 @@
<Reference Include="System.Reflection.Primitives" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Text.Encoding.Extensions" />
<Reference Include="System.Text.Encodings.Web" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Tasks" />
<Reference Include="System.Threading.Tasks.Extensions" />
Expand All @@ -256,7 +254,22 @@
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
<PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsVersion)" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj" />
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" Condition="'$(TargetFramework)' == 'net461'" />
</ItemGroup>

<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
<Choose>
<When Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ItemGroup>
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Text.Encodings.Web" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj" />
</ItemGroup>
</Otherwise>
</Choose>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static Type GetMemberType(MemberInfo memberInfo)

return memberInfo is PropertyInfo propertyInfo
? propertyInfo.PropertyType
: Unsafe.As<FieldInfo>(memberInfo).FieldType;
: Unsafe.As<FieldInfo>(memberInfo)!.FieldType;
}

// Cache the lookup from object property name to JsonPropertyInfo using a case-insensitive comparer.
Expand Down Expand Up @@ -390,13 +390,13 @@ private static bool PropertyIsOverridenAndIgnored(MemberInfo currentMember, Dict
Debug.Assert(currentMember is PropertyInfo || currentMember is FieldInfo);
PropertyInfo? currentPropertyInfo = currentMember as PropertyInfo;
Type currentMemberType = currentPropertyInfo == null
? Unsafe.As<FieldInfo>(currentMember).FieldType
? Unsafe.As<FieldInfo>(currentMember)!.FieldType
: currentPropertyInfo.PropertyType;

Debug.Assert(ignoredProperty is PropertyInfo || ignoredProperty is FieldInfo);
PropertyInfo? ignoredPropertyInfo = ignoredProperty as PropertyInfo;
Type ignoredPropertyType = ignoredPropertyInfo == null
? Unsafe.As<FieldInfo>(ignoredProperty).FieldType
? Unsafe.As<FieldInfo>(ignoredProperty)!.FieldType
: ignoredPropertyInfo.PropertyType;

return currentMemberType == ignoredPropertyType &&
Expand Down
4 changes: 4 additions & 0 deletions src/libraries/libraries-packages.proj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<ProjectReference Include="$(PkgDir)*\*.proj" Exclude="$(PkgDir)test\*" Condition="'$(BuildAllOOBPackages)' == 'true'" />
<ProjectReference Include="$(MSBuildThisFileDirectory)*\pkg\**\*.pkgproj" Condition="('$(BuildAllConfigurations)' == 'true' or '$(DotNetBuildFromSource)' == 'true') And '$(BuildAllOOBPackages)' == 'true'" />
<!-- If setting BuildAllOOBPackages to false, add bellow the individual OOB packages you want to continue to build -->
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.EventSource\pkg\Microsoft.Extensions.Logging.EventSource.pkgproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Primitives\pkg\Microsoft.Extensions.Primitives.pkgproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)System.Reflection.MetadataLoadContext\pkg\System.Reflection.MetadataLoadContext.pkgproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)System.Text.Json\pkg\System.Text.Json.pkgproj" />
<!-- This is merge marker 1 to help automerge -->
<!-- This is merge marker 2 to help automerge -->
<!-- This is merge marker 3 to help automerge -->
Expand Down
28 changes: 18 additions & 10 deletions src/libraries/pkg/baseline/packageIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -928,11 +928,13 @@
"3.1.0",
"3.1.1",
"3.1.2",
"5.0.0"
"5.0.0",
"5.0.1"
Copy link
Member

Choose a reason for hiding this comment

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

Should you include baselineVersion here?

],
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"5.0.0.0": "5.0.0"
"5.0.0.0": "5.0.0",
"5.0.0.1": "5.0.1"
}
},
"Microsoft.Extensions.Logging.TraceSource": {
Expand Down Expand Up @@ -1054,11 +1056,13 @@
"3.1.0",
"3.1.1",
"3.1.2",
"5.0.0"
"5.0.0",
"5.0.1"
],
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"5.0.0.0": "5.0.0"
"5.0.0.0": "5.0.0",
"5.0.0.1": "5.0.1"
}
},
"Microsoft.IO.Redist": {
Expand Down Expand Up @@ -4864,13 +4868,15 @@
"System.Reflection.MetadataLoadContext": {
"StableVersions": [
"4.6.0",
"5.0.0"
"5.0.0",
"5.0.1"
],
"BaselineVersion": "5.0.0",
"BaselineVersion": "5.0.1",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.6.0",
"5.0.0.0": "5.0.0"
"5.0.0.0": "5.0.0",
"5.0.0.1": "5.0.1"
}
},
"System.Reflection.Primitives": {
Expand Down Expand Up @@ -6468,17 +6474,19 @@
"StableVersions": [
"4.6.0",
"5.0.0",
"5.0.1"
"5.0.1",
"5.0.2"
],
"BaselineVersion": "5.0.0",
"BaselineVersion": "5.0.2",
"InboxOn": {
"netcoreapp3.0": "4.0.0.0",
"net5.0": "5.0.0.0"
},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.6.0",
"5.0.0.0": "5.0.0",
"5.0.0.1": "5.0.1"
"5.0.0.1": "5.0.1",
"5.0.0.2": "5.0.2"
}
},
"System.Text.RegularExpressions": {
Expand Down