Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Add ICloneable back to System.Runtime contract - #9970

Merged
stephentoub merged 1 commit into
dotnet:dev/apifrom
stephentoub:icloneable_ref
Jul 11, 2016
Merged

stephentoub merged 1 commit into
dotnet:dev/apifrom
stephentoub:icloneable_ref

Conversation

@stephentoub

Copy link
Copy Markdown
Member

We've got a bunch of types outside of mscorlib that implement this interface in desktop, and the lack of it is causing issues, e.g. https://github.com/dotnet/corefx/issues/9884. This commit adds the interface to the contract; when we subsequently update the packages, then we can start implementing this in types outside of System.Runtime (since System.Runtime is mostly a facade on System.Private.Corelib, the types it "contains" already implement the interface).

cc: @danmosemsft, @ericstj

We've got a bunch of types outside of mscorlib that implement this interface in desktop, and the lack of it is causing issues, e.g.  https://github.com/dotnet/corefx/issues/9884.  This commit adds the interface to the contract; when we subsequently update the packages, then we can start implementing this in types outside of System.Runtime (since System.Runtime is mostly a facade on System.Private.Corelib, the types it "contains" already implement the interface).
@danmoseley

Copy link
Copy Markdown

subsequently update the packages

Meaning, waiting on moving to master?

LGTM

@stephentoub

Copy link
Copy Markdown
Member Author

Meaning, waiting on moving to master?

Yup. (Or alternatively enabling building, publishing, consuming packages for the dev/api branch.)

Any time we update a contract that then needs to be consumed by the rest of the repo, it's basically:

  1. Add the API to the contract.
  2. Wait for new package to be published.
  3. Update the repo to consume the new package versions (e.g. the auto-submitted PRs from dotnet-bot)
  4. Bump the version of the contract used by the consuming component, assuming it wasn't already bumped.
  5. Party on.

Probably some other steps/nuances I'm missing that @ericstj can correct me on :)

@weshaggard

Copy link
Copy Markdown
Member

While enabling System.Runtime to build against System.Private.CoreLib I've noticed the IClonable interface doesn't exist there. It is however in the mscorlib reference assembly we are currently using. I'm investigating further understand why it is missing in System.Private.CoreLib but was in mscorlib and also has a type-forward to System.Private.CoreLib in the mscorlib facade.

@stephentoub

Copy link
Copy Markdown
Member Author

Hmm, it looks like it's missing in the model.xml in coreclr... I guess it's getting stripped out by the rewriter?

@weshaggard

Copy link
Copy Markdown
Member

Yeah I think I've figured out what is wrong and there are a few things missing. The mscorlib facade generation seems to be using the pre-bclrewritten version of System.Private.CoreLib. I'm going to fix that and any missing types.

@stephentoub

stephentoub commented Jul 23, 2016 •

Copy link
Copy Markdown
Member Author

Great. Thanks, Wes! I opened a PR to add ICloneable to model.xml, but feel free to close it if it gets in your way / is subsumed by whatever you do.

@danmoseley

Copy link
Copy Markdown

I'm glad you figured that out @weshaggard I was banging my head against it.

@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
Add ICloneable back to System.Runtime contract

Commit migrated from dotnet/corefx@eaaf700
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.

5 participants