{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/19119","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/19119/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/19119/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/19119/events","html_url":"https://github.com/dotnet/corefx/issues/19119","id":225189643,"number":19119,"title":"Scale back [Serializable] for .NET Core 2.0","user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars3.githubusercontent.com/u/2642209?v=3","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"labels":[{"id":174276033,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Runtime","name":"area-System.Runtime","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"morganbr","id":11641665,"avatar_url":"https://avatars2.githubusercontent.com/u/11641665?v=3","gravatar_id":"","url":"https://api.github.com/users/morganbr","html_url":"https://github.com/morganbr","followers_url":"https://api.github.com/users/morganbr/followers","following_url":"https://api.github.com/users/morganbr/following{/other_user}","gists_url":"https://api.github.com/users/morganbr/gists{/gist_id}","starred_url":"https://api.github.com/users/morganbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganbr/subscriptions","organizations_url":"https://api.github.com/users/morganbr/orgs","repos_url":"https://api.github.com/users/morganbr/repos","events_url":"https://api.github.com/users/morganbr/events{/privacy}","received_events_url":"https://api.github.com/users/morganbr/received_events","type":"User","site_admin":false},"assignees":[{"login":"morganbr","id":11641665,"avatar_url":"https://avatars2.githubusercontent.com/u/11641665?v=3","gravatar_id":"","url":"https://api.github.com/users/morganbr","html_url":"https://github.com/morganbr","followers_url":"https://api.github.com/users/morganbr/followers","following_url":"https://api.github.com/users/morganbr/following{/other_user}","gists_url":"https://api.github.com/users/morganbr/gists{/gist_id}","starred_url":"https://api.github.com/users/morganbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganbr/subscriptions","organizations_url":"https://api.github.com/users/morganbr/orgs","repos_url":"https://api.github.com/users/morganbr/repos","events_url":"https://api.github.com/users/morganbr/events{/privacy}","received_events_url":"https://api.github.com/users/morganbr/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/4","html_url":"https://github.com/dotnet/corefx/milestone/4","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/4/labels","id":1248719,"number":4,"title":"2.0.0","description":".NET Core 2.0, next major release. The due date 5/10 is [ZBB](https://github.com/dotnet/corefx/issues/17619) and expected time of last FI from master into release branch. See [official release dates](https://github.com/dotnet/core/blob/master/roadmap.md) for details.","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars2.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":115,"closed_issues":7426,"state":"open","created_at":"2015-08-10T18:04:00Z","updated_at":"2017-04-28T21:33:58Z","due_on":"2017-05-10T07:00:00Z","closed_at":null},"comments":6,"created_at":"2017-04-28T20:49:54Z","updated_at":"2017-04-28T21:45:57Z","closed_at":null,"body":"We brought [Serializable] and BinaryFormatter back for .NET Core 2.0 in the name of compat and helping code to migrate to core.  But it comes with some serious implications, and it's becoming clear we took things too far.  Doing this makes it very easy for code to take dependencies on private implementation details and will end up binding our hands for improvements/optimizations/refactorings/etc. in the future.  And with all of the improvements/optimizations/refactorings/etc. already made in core, we've had to punt on the idea of cross-runtime serialization support.  There needs to be a better happy-medium.\r\n\r\nThe primary need for BinaryFormatter and [Serializable] is on a few core types, e.g. primitives, some of the core collections (e.g. `List<T>`), some small wrapper types (e.g. `Tuple`), etc. Proposal from me and @morganbr for .NET Core 2.0:\r\n1. BinaryFormatter and friends are currently implemented in System.Runtime.Serialization.Formatters.dll.  We keep that as-is.\r\n2. SerializableAttribute, ISerializable, etc. are all implemented in System.Private.CoreLib.dll and exposed through System.Runtime.dll.  We keep that as-is.\r\n3. We remove most of the [Serializable] implementations we added back for .NET Core 2.0, keeping the most core and important 10% or so.  For this set, we a) potentially implement ISerializable if not already implemented in order to separate the implementation from the surfaced serialization state and to minimize the impact of future refactorings and optimizations, and b) try to enable desktop/core serialization/deserialization, so that BinaryFormatter'd state can go back and forth between desktop and core.  We'll need to finalize what the list of types is, but it would include all of the primiteves (e.g. Int32), core collection types (e.g. Dictionary), core wrapper types (e.g. KeyValuePair), Exception and important Exception-derived types, and a handful of others.  We can add more types in the future as they're highlighted as blockers, but in the meantime we avoid taking on the burden of lots of serializable types that'll hamper our ability to move the platform forward as we'd like."},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/298114091","html_url":"https://github.com/dotnet/corefx/issues/19119#issuecomment-298114091","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/19119","id":298114091,"user":{"login":"morganbr","id":11641665,"avatar_url":"https://avatars2.githubusercontent.com/u/11641665?v=3","gravatar_id":"","url":"https://api.github.com/users/morganbr","html_url":"https://github.com/morganbr","followers_url":"https://api.github.com/users/morganbr/followers","following_url":"https://api.github.com/users/morganbr/following{/other_user}","gists_url":"https://api.github.com/users/morganbr/gists{/gist_id}","starred_url":"https://api.github.com/users/morganbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganbr/subscriptions","organizations_url":"https://api.github.com/users/morganbr/orgs","repos_url":"https://api.github.com/users/morganbr/repos","events_url":"https://api.github.com/users/morganbr/events{/privacy}","received_events_url":"https://api.github.com/users/morganbr/received_events","type":"User","site_admin":false},"created_at":"2017-04-28T21:45:57Z","updated_at":"2017-04-28T21:45:57Z","body":"Would we also have to add TypeForwardedFrom attributes to desktop to handle types serialized by Core?"}}
{"actor":{"display_login":"morganbr"}}