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

Update changing-corelib.md #21220

Merged
merged 2 commits into from
Nov 27, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Update changing-corelib.md
  • Loading branch information
danmoseley committed Nov 27, 2018
commit 7b52bcd715316664cfaf3243937974959310c72b
5 changes: 2 additions & 3 deletions Documentation/project-docs/changing-corelib.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Changing or adding new public APIs to System.Private.CoreLib

### Context
Many of the CoreFX libraries type-forward their public APIs to the implementations in `System.Private.CoreLib`.
- The CoreFX build uses System.Private.CoreLib via a NuGet package named `Microsoft.TargetingPack.Private.CoreCLR`
- The CoreFX build uses `System.Private.CoreLib` via a NuGet package named `Microsoft.TargetingPack.Private.CoreCLR`
- Some of the CoreFX libraries are not built in the CoreFX repository. For example, `System.Runtime.Loader.dll` is purely a facade and type-forwards everything to `System.Private.CoreLib`. These libraries are built and published through a separate process.
- Hence, when adding a new public API to `System.Private.CoreLib` or changing the behavior of the existing public APIs in `System.Private.CoreLib`, you have to follow the sequence below to stage your changes so that new prerequisites are published before they are used.

## How to stage your change

### (1) Make the changes in both CoreCLR and CoreFX
- `System.Private.CoreLib` implementation changes should should be made in CoreCLR repo
- `System.Private.CoreLib` implementation changes should be made in CoreCLR repo
- Test and public API contract changes should be made in CoreFX repo
- [Build and test](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md#testing-with-private-coreclr-bits) both changes together

Expand All @@ -24,5 +24,4 @@ Many of the CoreFX libraries type-forward their public APIs to the implementatio
- Note: if your change is under [System.Private.CoreLib Shared Sources](https://github.com/dotnet/coreclr/tree/master/src/System.Private.CoreLib/shared), it will get mirrored to other repos that are reusing the CoreLib sources. This is a one-way mirror of sources for code reuse purposes: it does not bring your new API to CoreFX so it is not relevant to this staging process.
- The CoreCLR changes will be consumed by CoreFX via an automatically created PR that updates a hash in the CoreFX repo. These PR's [look like this](https://github.com/dotnet/corefx/pulls?utf8=%E2%9C%93&q=is%3Apr+sort%3Aupdated-desc+coreclr++base%3Amaster+author%3Adotnet-maestro-bot+)
- Depending on the nature of the change, we may cherry-pick your CoreFX PR into this automatically created PR; or, we may merge your PR after we merge the automatically created PR.
- Consider creating a new PR against CoreCLR to re-enable any tests you had to disable in your original CoreCLR PR. This can be merged when CoreCLR in turn consumes CoreFX with your chanbges.
- You are done! Thank you for contributing.