Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Move serialization primitives to System.Runtime #10667

Merged
merged 2 commits into from
Aug 15, 2016

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Aug 9, 2016

cc: @weshaggard @stephentoub
replaces: #10388

This PR takes the old one that @stephentoub started, and finishes it by updating the packages correctly in order to have the right surface area for each TargetGroup.

Original PR message:

We need BinaryFormatter to be able to serialize types from coreclr that use the various serialization types (e.g. ISerializable), which means those types must have the same identity as the ones BinaryFormatter recognizes, and we need a bunch of types all across corefx to be able to use these same types to implement serialization. As such, the types are moving down to System.Runtime, and on coreclr, are type-forwarding to the implementations there.
There are a few outstanding issues:

  • SR is not currently available in System.Runtime. The few uses of SR in the versions of the code used for corert have been replaced by hardcoded strings and TODOs.
  • Debug.Assert is not currently available in System.Runtime. Asserts have been commented out with TODOs.
  • To get things to build as types are moving around, P2P references are used.
    (Once this is in place, I'll be able to finish up deploying serialization throughout corefx; I have a partially completed local branch adding all of that in.)

Debug.Assert(null != name, "[SerializationInfo.UpdateValue]name!=null");
Debug.Assert(null != value, "[SerializationInfo.UpdateValue]value!=null");
Debug.Assert(null != type, "[SerializationInfo.UpdateValue]type!=null");
//Debug.Assert(null != name, "[SerializationInfo.UpdateValue]name!=null");
Copy link
Member

Choose a reason for hiding this comment

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

Why are these asserts commented out?

Copy link
Member Author

Choose a reason for hiding this comment

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

As per the original PR message written by @stephentoub:

Debug.Assert is not currently available in System.Runtime. Asserts have been commented out with TODOs.

@@ -4,15 +4,17 @@
<PropertyGroup>
<AssemblyName>System.Runtime.Serialization.Primitives</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
Copy link
Member

Choose a reason for hiding this comment

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

FYI - I've reverted some of the versioning changes to this library in master see PR #10707. We will need to handle that merge accordingly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, yeah I'll fix the merge conflicts.

@weshaggard
Copy link
Member

A few minor comments but otherwise looks good.

@joperezr joperezr force-pushed the move_serialization_primitives branch 4 times, most recently from b77e750 to 3768b22 Compare August 12, 2016 22:41
stephentoub and others added 2 commits August 15, 2016 09:47
We need BinaryFormatter to be able to serialize types from coreclr that use the various serialization types (e.g. ISerializable), which means those types must have the same identity as the ones BinaryFormatter recognizes, and we need a bunch of types all across corefx to be able to use these same types to implement serialization.  As such, the types are moving down to System.Runtime, and on coreclr, are type-forwarding to the implementations there.

There are a few outstanding issues:
- SR is not currently available in System.Runtime.  The few uses of SR in the versions of the code used for corert have been replaced by hardcoded strings and TODOs.
- Debug.Assert is not currently available in System.Runtime.  Asserts have been commented out with TODOs.
- To get things to build as types are moving around, P2P references are used.
@joperezr joperezr force-pushed the move_serialization_primitives branch from 3768b22 to 17aa557 Compare August 15, 2016 17:09
@joperezr joperezr merged commit a9ab503 into dotnet:dev/api Aug 15, 2016
@joperezr joperezr deleted the move_serialization_primitives branch August 15, 2016 19:55
@stephentoub
Copy link
Member

Thanks for finishing this, @joperezr.

@karelz karelz modified the milestone: 1.2.0 Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…on_primitives

Move serialization primitives to System.Runtime

Commit migrated from dotnet/corefx@a9ab503
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants