Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring CoreRT and CoreCLR's CoreLibs into sync #7394

Closed
5 of 7 tasks
danmoseley opened this issue Feb 9, 2017 · 13 comments
Closed
5 of 7 tasks

Bring CoreRT and CoreCLR's CoreLibs into sync #7394

danmoseley opened this issue Feb 9, 2017 · 13 comments
Labels
help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@danmoseley
Copy link
Member

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.

  • Rename coreclr\src\mscorlib\corefx to coreclr\src\mscorlib\shared
  • Renames in CoreCLR to bring directories and files to match CoreRT eg
    rename coreclr\src\mscorlib to coreclr\src\System.Private.CoreLib
  • Update CoreCLR corelib's resource generation: change from .txt to .resx and autogenerate the SR.cs
  • A lot of places in CoreCLR CoreLib use "ThrowHelper" class. ThrowHelper does not work well with ProjectN toolchain because of its use of reflection. Find a way to how to unify these. The ideal solution would be IL-to-IL optimizer that does the ThrowHelper optimization everywhere (see Proposal: IL optimization step roslyn#15929 (comment)).
  • Take chunks of CoreRT, merge with CoreCLR and commit to CoreCLR then turn around and commit same to CoreRT.
  • As part of the merging process or separately, segregate the files into folders like private and shared where private are those that call into the runtime or are closely connected and shared are those the former merely depend on. Other runtimes will likely only care about shared. This will need some exploration.
  • Add automatic mirror of the shared part between CoreCLR and CoreRT. The idea is to use similar setup to what we have been using to mirror between TFS and github

Some of this was already done --

dotnet/coreclr#9259
dotnet/coreclr#9251

Edit: changed folder name from core to private

@weshaggard
Copy link
Member

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

@jkotas
Copy link
Member

jkotas commented Feb 10, 2017

coreclr\src\System.Private.CoreLib\corert

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

@danmoseley
Copy link
Member Author

Added a checkbox for that segregation.

@jkotas
Copy link
Member

jkotas commented Feb 10, 2017

folders like core and

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

@jkotas jkotas changed the title Finish bringing CoreRT and CoreCLR's CoreLibs into sync Bring CoreRT and CoreCLR's CoreLibs into sync Feb 25, 2017
@alexperovich
Copy link
Member

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

@karelz
Copy link
Member

karelz commented Mar 17, 2017

Is it rather 2.1 issue than 2.0?

@danmoseley
Copy link
Member Author

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

@danmoseley
Copy link
Member Author

@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
Copy link
Member Author

@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
Copy link
Member

jkotas commented Apr 26, 2018

I do not see reflection

Enum.ToString is reflection call.

@danmoseley
Copy link
Member Author

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
Copy link
Member

jkotas commented Apr 26, 2018

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
Copy link
Member

jkotas commented Apr 26, 2018

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.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

No branches or pull requests

6 participants