dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.15k stars 4.71k forks source link

Bring CoreRT and CoreCLR's CoreLibs into sync #7394

Closed danmoseley closed 4 years ago

danmoseley commented 7 years ago

We want to do this to (1) get code formatting from CoreRT (2) get bug fixes and new API to CoreRT so they reach UWP.

Some of this was already done --

https://github.com/dotnet/coreclr/pull/9259 https://github.com/dotnet/coreclr/pull/9251

Edit: changed folder name from core to private

weshaggard commented 7 years ago

Do we plan to try and share the source via submoduling or some other technique?

jkotas commented 7 years ago

coreclr\src\System.Private.CoreLib\corert

This may rather be coreclr\src\System.Private.CoreLib\shared as we have discussed

danmoseley commented 7 years ago

Added a checkbox for that segregation.

jkotas commented 7 years ago

folders like core and

Yet another core ... we are ~42 core project :-) Maybe call it unshared or exclusive?

alexperovich commented 7 years ago

I have the shared portions of coreclr and corert synchronized and my synching tool is now running to keep those directories in sync.

karelz commented 7 years ago

Is it rather 2.1 issue than 2.0?

danmoseley commented 6 years ago

Work continues on this and much progress was made; however it is not aligned with 2.1 per se.

danmoseley commented 6 years ago

@jkotas

A lot of places in CoreCLR CoreLib use "ThrowHelper" class. ThrowHelper does not work well with ProjectN toolchain because of its use of reflection.

I am looking in C:\git\coreclr\src\mscorlib\src\System\ThrowHelper.cs and I do not see reflection. Where am I missing?

danmoseley commented 6 years ago

@jkotas do you still think it is worth renaming coreclr\src\mscorlib to coreclr\src\System.Private.CoreLib ? That seems like the only remaining rename.

jkotas commented 6 years ago

I do not see reflection

Enum.ToString is reflection call.

danmoseley commented 6 years ago

Hmm, there is certainly plenty more reconciliation (merge and move to shared) that can be done between C:\git\corert\src\system.private.corelib\src C:\git\coreclr\src\mscorlib\src although most of it is no longer trivial and would be best attempted with domain knowledge there is some more cosmetic/easier merging that could be done.

jkotas commented 6 years ago

There is certainly plenty more reconciliation

Yes, about ~100 files.

Here is the list I got from @marek-safar that the Mono team would love to see reconciled to make their sharing with Mono easier:

src/System/Array.cs
src/System/Collections/Generic/ArraySortHelper.cs
src/System/Globalization/GlobalizationMode.cs
src/System/Runtime/CompilerServices/TaskAwaiter.cs
src/System/Threading/Tasks/TaskFactory.cs
src/System/Threading/Tasks/FutureFactory.cs
src/System/Threading/Tasks/TaskScheduler.cs
src/System/Threading/Tasks/Task.cs
src/System/Threading/Tasks/Future.cs
src/System/Threading/Tasks/TaskContinuation.cs
src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs
jkotas commented 6 years ago

you still think it is worth renaming coreclr\src\mscorlib to coreclr\src\System.Private.CoreLib

I think it would make sense. The mscorlib name is confusing.