-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[corlib] CoreFX sources for System namespace #8626
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
Conversation
mcs/class/corlib/corlib.dll.sources
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping these ../../../external/corefx paths mixed with the "local" and the referencesource one looks messy when you look at the .dll.sources file. It's already been fixed previously #8389. I don't want you to require to change it since it's not really breaking anything, but it would be better over the long run to move these files into their own block with the rest of the ../../../external/corefx paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luhenry ok, I'll re-order them before merge, I am replacing sources via tool I mentioned in the description
|
@monojenkins build Linux x64 |
|
There is still a lot of extra TypeForwardedFromAttribute, could you also add tests for all non trivial types we are switching |
|
@marek-safar yeah I know, the today's mono/corefx patch was for a different PR. |
|
@monojenkins build failed |
|
btw, there is still one more serialization forwarded at InvalidComObjectException |
|
So it looks like currently there are two issues left:
|
|
@EgorBo it means the test suite aborted at some point - aborts are non-fatal on wasm. Here's the error: It's a trivial fix, I'll push a PR with a fix tomorrow. |
|
@kumpera awesome! Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not change it - seems like IDE did it (vscode or rider) 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of copying the file we should make #if MONO in the corert version (like we did with Interop.RunLoop.cs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah probably makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this end up calling to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DllImport("__Internal") will end up not working on desktop when using the mono-sgen executable (because of how dlsym works. Use an internal call to make sure it works everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akoeplinger https://msdn.microsoft.com/en-us/library/ehz2dset.aspx (c run-time library) - it's needed only for Windows - https://github.com/dotnet/corert/blob/e79755bebe745c1229df8e5ba9a20b4fa3fc950d/src/System.Private.CoreLib/src/System/Number.Windows.cs#L27 and https://github.com/dotnet/corert/blob/df8d48011ebc11c5c97b8384275d40ef4f95388e/src/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs#L1015 but I am not quite sure why we can't just use snprintf icall on all platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a fix was already merged: dotnet/coreclr#18221, can we cherrypick this into our corefx fork and reenable the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DllImport("__Internal") will end up not working on desktop when using the mono-sgen executable (because of how dlsym works. Use an internal call to make sure it works everywhere.
mono/metadata/icall-def.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ves_icall_System_Runtime_RuntimeImports_ecvt_s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, copy-paste :(
…es array (#81) Cherry-pick dotnet/coreclr#18221 For mono/mono#8626 (comment)
|
@monojenkins build failed |
063a70f to
3fdc2f5
Compare
# Conflicts: # external/api-snapshot # external/corefx # mcs/class/corlib/corefx/SR.missing.cs # mcs/class/corlib/corlib.dll.sources # mcs/class/corlib/win32_net_4_x_corlib.dll.exclude.sources # mcs/class/corlib/winaot_corlib.dll.exclude.sources
# Conflicts: # mono/metadata/icall-def.h
|
A small effort to test whether CoreRT's Decimal works for CoreCLR or not: dotnet/coreclr#18868 |
|
@monojenkins build failed |
|
@EgorBo please rebase and bump monolite version |
|
@monojenkins build deb with monolite |
1 similar comment
|
@monojenkins build deb with monolite |
|
@monojenkins commit apidiff and csproj |
Squashed commit of the following: commit a5616c7b080f3fcb387e08498b103f2e4ac2f617 Author: Martin Baulig <[email protected]> Date: Thu Jul 19 15:40:57 2018 -0400 [corlib]: Cleanup `X509Certificate` implementation and sync it with CoreFX. Completely refactored the `X509Certificate` implementation to make it based very closely on CoreFX. We cannot fully switch to their implementation yet because we are missing things and they also have a few issues in their implementation. However, this will make it a lot easier to do this at a later time. The internal `X509CertificateImpl` has been cleaned up as well, using properties instead of methods in most places and the `ToString()` implementation is now shared between all platforms. * `X509Certificate.GetSerialNumberString()`: we keep the our old behavior here as their change seems to be a regression - see https://github.com/dotnet/corefx/issues/30543. * `X509Certificate.CreateFromSignedFile()`: in CoreFX, this is the same as `CreateFromCertFile()`. Our old implementation was incomplete and did not verify the signature - we even had a test where loading a certificate with an invalid signature was supposed to work; this test has been disabled because we're now throwing an exception. * `X509CertificateImpl.KeyAlgorithmParameters`: this is supposed to throw `CryptographicException` on error, see `Certificate13` in `X509CertificateTest.cs`. * We now match CoreFX's behavior regarding serialization - while the `X509Certificate` type is still marked as `[Serializable]`, we now throw `PlatformNotSupportedException` when attempting to serialize or deserialize it. commit 045d5cb Author: Jay Krell <[email protected]> Date: Mon Jul 23 13:29:34 2018 -0700 Remove ves_icall_System_AppDomain_GetIDFromDomain. (#9674) commit f07691d Author: Marek Safar <[email protected]> Date: Mon Jul 23 17:00:54 2018 +0200 [mcs] Don't wrap exception expression in contextual return. Fixes #9505 commit abc66ce Author: Filip Navara <[email protected]> Date: Mon Jul 23 17:55:05 2018 +0200 [MacOS] On Mac, use the copyfile API to copy files (#9642) [MacOS] On Mac, use the copyfile API to copy files Rebase of #9038 with added fix for the failing unit tests. Note that there's a race condition in the check between `source file == destination file` and the `copyfile` call, but a similar race condition already exists there in the current code except the outcome is different. commit eeb2802 Author: Martin Baulig <[email protected]> Date: Mon Jul 23 09:12:09 2018 -0400 Use `SafePasswordHandle` in the internal certificate APIs. (#9651) * `X509Helper`, `X509CertificateImpl`, `X509Certificate2Impl` and `ISystemCertificateProvider` now use `SafePasswordHandle` instead of strings. * `X509Certificate`: actually implement `SecurePassword` based APIs using `SafePasswordHandle`. * `mono_btls_pkcs12_import()`: when passed an empty password, try both the empty string and null. commit f093a01 Author: Zoltan Varga <[email protected]> Date: Mon Jul 23 07:40:06 2018 -0400 [runtime] Return the result properly from mono_exception_walk_trace (). (#9675) [runtime] Return the result properly from mono_exception_walk_trace (). commit 495d581 Author: monojenkins <[email protected]> Date: Sun Jul 22 13:15:59 2018 -0400 [bcl] Update BCL Linked Size (#9682) commit e09d690 Author: Vlad Brezae <[email protected]> Date: Fri Jul 20 12:22:56 2018 +0300 [interp] Don't throw exception on -1 division commit 57a98c6 Author: Bernhard Urban <[email protected]> Date: Fri Jul 20 15:36:47 2018 +0200 address review feedback commit e2ab85d Author: Bernhard Urban <[email protected]> Date: Thu Jul 19 15:40:21 2018 +0200 [interp] add Span<T> intrinsics for get_Item and get_Length similar to https://github.com/mono/mono/pull/9086/files#diff-89fe30e1e87c5db21be052ddb0c8e28dR183 commit 67f0605 Author: Bernhard Urban <[email protected]> Date: Thu Jul 19 19:59:17 2018 +0200 [mini] return gracefully from compile_special if a method can not be compiled the caller will check `error` anyway. It allows the machinery to try the interpreter instead. commit ea39bf8 Author: Alexander Köplinger <[email protected]> Date: Sat Jul 21 03:01:15 2018 +0200 [linker] Move BCL size diff to nightly job It was too annoying on every PR commit 2a4af93 Author: Egor Bogatov <[email protected]> Date: Fri Jul 20 22:33:05 2018 +0300 [corlib] CoreFX sources for System namespace (#8626) Brings CoreFX and CoreRT sources for primitive types inside corlib (and other types under System namespace) Part of #7737
Brings CoreFX and CoreRT sources for primitive types inside corlib (and other types under System namespace) Part of mono/mono#7737 Commit migrated from mono/mono@2a4af93
Brings CoreFX and CoreRT sources for primitive types inside corlib (and other types under System namespace)
ADS: I use this tool to inspect all files I replace https://github.com/EgorBo/MonoMergeHelper 🙂
Part of #7737