Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@EgorBo
Copy link
Member

@EgorBo EgorBo commented May 8, 2018

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

Copy link
Contributor

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.

Copy link
Member Author

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

@EgorBo
Copy link
Member Author

EgorBo commented May 8, 2018

@monojenkins build Linux x64

@marek-safar
Copy link
Member

There is still a lot of extra TypeForwardedFromAttribute, could you also add tests for all non trivial types we are switching

@EgorBo
Copy link
Member Author

EgorBo commented May 8, 2018

@marek-safar yeah I know, the today's mono/corefx patch was for a different PR.
I'll file one more tomorrow to hide these ones.

@EgorBo EgorBo changed the title [corlib] CoreFX sources for System namespace [WIP][corlib] CoreFX sources for System namespace May 21, 2018
@EgorBo EgorBo requested review from lambdageek and vargaz as code owners May 30, 2018 16:39
@EgorBo EgorBo requested a review from kumpera as a code owner June 10, 2018 00:56
@EgorBo
Copy link
Member Author

EgorBo commented Jun 11, 2018

@monojenkins build failed

@marek-safar
Copy link
Member

btw, there is still one more serialization forwarded at InvalidComObjectException

@EgorBo
Copy link
Member Author

EgorBo commented Jun 12, 2018

So it looks like currently there are two issues left:

  1. WebAssembly - not sure what the error means
  2. Decimal.cs doesn't compile when mcs is used

@kumpera
Copy link
Contributor

kumpera commented Jun 12, 2018

@EgorBo it means the test suite aborted at some point - aborts are non-fatal on wasm.

Here's the error:

WASM: CANNOT HANDLE COOKIE IDIII
WASM: * Assertion at /mnt/jenkins/workspace/test-mono-pull-request-wasm/mono/mini/wasm_m2n_invoke.g.h:535, condition `0' not met

It's a trivial fix, I'll push a PR with a fix tomorrow.

@kumpera
Copy link
Contributor

kumpera commented Jun 12, 2018

@EgorBo #9107

@EgorBo
Copy link
Member Author

EgorBo commented Jun 12, 2018

@kumpera awesome! Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?

Copy link
Member Author

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) 🙂

Copy link
Member

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah probably makes sense

Copy link
Member

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?

Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, copy-paste :(

@EgorBo
Copy link
Member Author

EgorBo commented Jun 17, 2018

@monojenkins build failed

@EgorBo EgorBo force-pushed the corefx-corlib-system branch from 063a70f to 3fdc2f5 Compare June 26, 2018 04:05
EgorBo added 5 commits July 16, 2018 11:36
# 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
@EgorBo
Copy link
Member Author

EgorBo commented Jul 16, 2018

A small effort to test whether CoreRT's Decimal works for CoreCLR or not: dotnet/coreclr#18868

@EgorBo
Copy link
Member Author

EgorBo commented Jul 17, 2018

@monojenkins build failed

@marek-safar marek-safar changed the title [WIP][corlib] CoreFX sources for System namespace [corlib] CoreFX sources for System namespace Jul 20, 2018
@marek-safar
Copy link
Member

@EgorBo please rebase and bump monolite version

@EgorBo
Copy link
Member Author

EgorBo commented Jul 20, 2018

@monojenkins build deb with monolite

1 similar comment
@marek-safar
Copy link
Member

@monojenkins build deb with monolite

@akoeplinger
Copy link
Member

@monojenkins commit apidiff and csproj

monojenkins added a commit to mono/api-snapshot that referenced this pull request Jul 20, 2018
@akoeplinger akoeplinger merged commit 2a4af93 into mono:master Jul 20, 2018
baulig pushed a commit that referenced this pull request Jul 23, 2018
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
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants