blob: cca5095078725e5acedce2d00f8a0affd6045d5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
Adding new public APIs to System.Private.CoreLib
================================================
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 Microsoft.TargetingPack.Private.CoreCLR Nuget package.
- 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, changes must be staged to ensure that new prerequisites are published before they are used.
**Staging the changes**
Make the changes to CoreCLR, including System.Private.CoreLib
- Merge the changes
- Wait for a new System.Private.CoreLib to be published. Check the latest published version [here](https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.TargetingPack.Private.CoreCLR).
Make the changes to CoreFX consuming the new APIs in System.Private.CoreLib
- If the changes are to libraries that are built out of the CoreFX repository:
- You will likely see a build failure until a new System.Private.CoreLib contract is published
- If the changes are to libraries that are **not** built out of the CoreFX repository:
- For example, pure facades such as System.Runtime.Loader.dll
- There will likely not be a build failure
- But you will still need to wait for the new System.Private.CoreLib contract to be published before merging the change, otherwise, facade generation will fail
- Merge the changes
- Wait for new contracts to be published for libraries with new APIs. Check the latest published versions [here](http://myget.org/gallery/dotnet-core).
Add tests
- You should now be able to consume the new APIs and add tests to the CoreFX test suite
- Until new contracts are published, you will likely see a build failure indicating that the new APIs don't exist.
- Note that on Windows, CoreFX tests currently use a potentially old published build of CoreCLR
- You may need to disable the new tests on Windows until CoreFX tests are updated to use a newer build of CoreCLR.
|