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

Setting up infrastructure for UTF8StringExperiment in order to have full ci and official build support #2

Merged
merged 4 commits into from
Jul 21, 2020

Conversation

joperezr
Copy link
Member

This isn't ready for merge, I will be adding several commits in order to identify all infra that will be required in order to get both CI and official build support for this first experiment in runtimelab.

cc: @safern to take a look on yml changes. Worth noting that runtimelab.yml is a new yml which the main pipeline of this repo will be based on. runtimelab.yml will be checked into dotnet/runtime when we feel it is at a ready enough state for experiments on this repo.

FYI: @jkotas

eng/pipelines/runtimelab.yml Outdated Show resolved Hide resolved
eng/pipelines/runtimelab.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,55 @@
# Steps used to prepare the Artifacts Staging Directory with required files for
Copy link
Member

Choose a reason for hiding this comment

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

Nit: maybe name this template, prepare-publish-for-framework or something like that? Cause this is not just for tests, this is also for the official build.

eng/pipelines/runtimelab.yml Outdated Show resolved Hide resolved
@joperezr
Copy link
Member Author

@jkotas @safern Do you guys have anything to add to CI here or is this ready to go? we are currently running libraries and coreclr tests, you can probably check the checks to see what's included for now.

@joperezr
Copy link
Member Author

Actually this will be broken by latest changes @safern made on dotnet/runtime so let me do one more pull of dotnet/runtime here and adjust that.

Adding simple full build of both Debug and Release using global scripts

Removing mono subset from builds

Adding UTF8String OOB package to the build

Adding post-Build extensibility in order to create artifacts out of
build output for coreclr and libraries tests.

Addressing PR Feedback

Adding libraries tests and coreclr test build

Fixing test execution for libraries and coreclr test build

Adding CoreCLR test execution

Addressing PR Feedback

Fix Coreclr Test run by adding test native assets artifact

Add build of native coreclr test assets

Fixing path of coreclr native test assets that are published

Fixing dependsOn for coreclr Windows tests
@joperezr
Copy link
Member Author

Ok, now I have addressed that conflict and CI is running now. Let me know if you guys want me to add anything else but if not I'll go ahead and merge once this is green in order to start working on porting this back to dotnet/runtime and also to enable official build support for runtimelab.

dependsOnTestBuildConfiguration: Release
dependsOnTestArchitecture: x64
dependsOn:
- build_Windows_NT_x64_Release_
Copy link
Member

Choose a reason for hiding this comment

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

This will add a lot of duplication if we want to build for more platforms where the only thing that differs is the dependsOn. I guess we could be smarter later on and have a prefix and then use osGroup, archType, buildConfig and a suffix and then construct the dependsOn on the job template directly.

Don't have to address this on the PR but just a note that it might make the entry point yml "cleaner"

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 agree, I could also just keep a single one but then would have to wait for build that aren't really required in order to start running other jobs.

@joperezr
Copy link
Member Author

For some reason, the badge hasn't updated here but PR is all green now. Thanks all for the review; I will now follow up and make a PR with these changes back to dotnet/runtime.

@joperezr joperezr merged commit 5c1a549 into dotnet:Utf8String Jul 21, 2020
scalablecory pushed a commit that referenced this pull request Sep 22, 2020
Updates the build files to CMake (instead of VS project files and Linux makefiles). Also adds googletest submodule for test dependency.

Corresponding internal PR: 3965727
yowl added a commit to yowl/runtimelab that referenced this pull request Feb 5, 2021
…orRunner}

>	clrjit_unix_x64_x64.dll!Compiler::getPrimitiveTypeForStruct(unsigned int structSize, CORINFO_CLASS_STRUCT_ * clsHnd, bool isVarArg) Line 723	C++

with

Run-Time Check Failure dotnet#2 - Stack around the variable 'gcPtr' was corrupted.
jkotas added a commit that referenced this pull request Mar 21, 2021
* attempt with LLVMMethodCodeNode -> MethodCodeNode

* Fails at {[S.P.CoreLib]System.Runtime.CompilerServices.ClassConstructorRunner}

>	clrjit_unix_x64_x64.dll!Compiler::getPrimitiveTypeForStruct(unsigned int structSize, CORINFO_CLASS_STRUCT_ * clsHnd, bool isVarArg) Line 723	C++

with

Run-Time Check Failure #2 - Stack around the variable 'gcPtr' was corrupted.

* build wasm32/64 clrjits and load the wasm clrjit dll for wasm32

Wasm64 has some macros defined, but otherwise not compiled
Copied mostly from the xarch and AMD64 macros to get something to compile and run.

* Remove lowering/emit/lrsa/codegen by #ifdefs

Some code alerts false where not sure what to do.

Passes non-wasm tests locally.

* remove inst* with ifdef

remove stacklevelsetter with ifdef
fix ifdef syntax

* Dont include eeDispVars for wasm

* exclude wasm jit from unix builds - wasm doesn't build there at the moment

attempt to add a second platform to the wasm yaml build
fix problem where Array<T>.Resize has its code compiled twice.

* extende jitinterface to get the LLVM module

* Will compile but wont link (no libLLVM.lib)

May also need before including any LLVM header files:

#undef NumItems

* change llvm config path to 11 (hard coded for now)

* Tidy CMakeLists.txt for jit and add LLVM libraries

Fix up some merge problems

* revert jit interface

add callback for mangled name

* add loops for blocks and statements

* first method compiles

* add min/max to clr_std/utility

* use cmake and msbuild from env

* set up clrjit build for wasm

additional exports for llvm clrjit

* Enable CI be adding step to download and build LLVM (also need xv as that is the compression Llvm use)

Add build of clrjit for Windows x64 Debug only.  This means that WebAssembly can only be built on that combination (as is the tested case currently).

* move genType../genActualTypes to compiler.cpp

* address feedback

- Remove unnecessary ifdefs
- Replace ifdefs with cmake exclusions
- Fix passing of corinfo
- remove some comments

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
runtimelab-bot pushed a commit that referenced this pull request May 11, 2021
* add new obsoletion ID

* nowarn for new obsoletion

* add obsoletions to csproj

* AesCryptoServiceProvider obsoletion

* DESCryptoServiceProvider obsoletion

* MD5CryptoServiceProvider obsoletion

* RC2CryptoServiceProvider obsoletion

* SHA1CryptoServiceProvider obsoletion

* SHA256CryptoServiceProvider obsoletion

* SHA384CryptoServiceProvider obsoletion

* SHA512CryptoServiceProvider obsoletion

* TripleDESCryptoServiceProvider obsoletion

* add obsoletions to csproj

* *Managed obsoletions

* add pragma suppress for types usages

* add nowarn in tests csproj

* add documentation

* add nowarn to new identified tests csproj

* add pragma suppress for types usages #2

* update documentation

* fix md5 usage

* Fix indentation

* fix obsoletions inclusion in csproj

* remove extra obsoletions inclusion in csproj

* De-dupe project items that were in both the browser and non-browser configs. Ensure Obsoletions.cs is included in all configs.

* Remove duplicate RandomNumberGeneratorImplementation.cs reference

* Update documentation

* Remove duplicate Obsoletions.cs from project file (introduced in merge)

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeff.handley@microsoft.com>
runtimelab-bot pushed a commit that referenced this pull request May 18, 2021
…2769)

Transition to GC Unsafe mode on every MONO_RT_EXTERNAL_ONLY function in
reflection.c

In particular, fix mono_reflection_type_from_name which is used in
https://github.com/xamarin/xamarin-android/blob/681887ebdbd192ce7ce1cd02221d4939599ba762/src/monodroid/jni/embedded-assemblies.cc#L350

Fixes stack traces like

```
05-14 08:06:12.848 31274 31274 F DEBUG   :       #00 pc 00000b99  [vdso] (__kernel_vsyscall+9)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #1 pc 0005ad68  /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #2 pc 00076511  /apex/com.android.runtime/lib/bionic/libc.so (abort+209) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #3 pc 0002afcd  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::MonodroidRuntime::mono_log_handler(char const*, char const*, char const*, int, void*)+141) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #4 pc 00112c5d  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (eglib_log_adapter+141) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #5 pc 00020fdf  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (monoeg_g_logv+175) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #6 pc 0002113a  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (monoeg_g_log+42) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #7 pc 00128892  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_transition_do_blocking+258) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #8 pc 0012a406  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_enter_gc_safe_region_unbalanced_with_info+134) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #9 pc 0012a27e  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_enter_gc_safe_region_internal+46) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #10 pc 000799a7  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_loader_lock+71) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #11 pc 000447a1  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_create_from_typedef+129) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #12 pc 0003c073  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_get_checked+99) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #13 pc 0003cc0f  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_from_name_checked_aux+735) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #14 pc 00037989  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_from_name_checked+73) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #15 pc 000cc5f4  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_get_type_internal+132) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #16 pc 000c9bce  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_get_type_with_rootimage+126) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #17 pc 000ca204  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (_mono_reflection_get_type_from_info+292) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #18 pc 000ca06e  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_type_from_name_checked+334) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #19 pc 000c9f01  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_type_from_name+49) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #20 pc 0001b40b  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(char const*)+427) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #21 pc 0001b551  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(_MonoString*)+113) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #22 pc 000211a7  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::MonodroidRuntime::typemap_java_to_managed(_MonoString*)+39) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
```
runtimelab-bot pushed a commit that referenced this pull request May 18, 2021
* [build] Define NO_UNALIGNED_ACCESS for 32-bit arm platforms

Possibly related to crashes on Android like this:

```
05-18 10:59:07.466 17076 17076 F libc    : Fatal signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb9c95a41 in tid 17076 (simplehellomaui), pid 17076 (simplehellomaui)
05-18 10:59:07.501 17104 17104 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
05-18 10:59:07.502   989   989 I tombstoned: received crash request for pid 17076
05-18 10:59:07.503 17104 17104 I crash_dump32: performing dump of process 17076 (target tid = 17076)
05-18 10:59:07.512 17104 17104 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-18 10:59:07.512 17104 17104 F DEBUG   : Build fingerprint: 'google/crosshatch/crosshatch:11/RQ2A.210405.005/7181113:user/release-keys'
05-18 10:59:07.512 17104 17104 F DEBUG   : Revision: 'MP1.0'
05-18 10:59:07.512 17104 17104 F DEBUG   : ABI: 'arm'
05-18 10:59:07.515 17104 17104 F DEBUG   : Timestamp: 2021-05-18 10:59:07+0200
05-18 10:59:07.515 17104 17104 F DEBUG   : pid: 17076, tid: 17076, name: simplehellomaui  >>> com.microsoft.simplehellomaui <<<
05-18 10:59:07.515 17104 17104 F DEBUG   : uid: 10364
05-18 10:59:07.515 17104 17104 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb9c95a41
05-18 10:59:07.515 17104 17104 F DEBUG   :     r0  bb4a5cd0  r1  b9c95a49  r2  00000000  r3  e94c7520
05-18 10:59:07.515 17104 17104 F DEBUG   :     r4  0000000c  r5  00000000  r6  ff843c50  r7  ff843e70
05-18 10:59:07.515 17104 17104 F DEBUG   :     r8  b69547f8  r9  e99eac50  r10 00000000  r11 00000021
05-18 10:59:07.515 17104 17104 F DEBUG   :     ip  e94c74f0  sp  ff843c48  lr  bb31e0dd  pc  bb3a4d24
05-18 10:59:07.531   709   709 E Layer   : [Surface(name=Task=1)/@0x52e6b1a - animation-leash#0] No local sync point found
05-18 10:59:07.532   709   709 E Layer   : [Surface(name=Task=1571)/@0x9c90165 - animation-leash#0] No local sync point found
05-18 10:59:07.706 17104 17104 F DEBUG   : backtrace:
05-18 10:59:07.707 17104 17104 F DEBUG   :       #00 pc 000ddd24  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_method_to_ir+9232) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #1 pc 000d7777  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (inline_method+622) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #2 pc 000ec0a3  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_method_to_ir+67470) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #3 pc 000cda6d  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mini_method_compile+2264) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #4 pc 000cf413  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_jit_compile_method_inner+50) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #5 pc 000d1d7f  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_jit_compile_method_with_opt+1766) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #6 pc 0012d94d  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (common_call_trampoline+832) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #7 pc 0012d5cb  /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_magic_trampoline+62) (BuildId: d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG   :       #8 pc 0000006a <anonymous:b7986000>
```

* move to host/target sections
runtimelab-bot pushed a commit that referenced this pull request Jun 22, 2022
* Initial implementation for contract customization

fix build errors

Move converter rooting to DefaultJsonTypeInfoResolver so that it can be used standalone

Fix ConfigurationList.IsReadOnly

Minor refactorings (#1)

* Makes the following changes:

* Move singleton initialization for DefaultTypeInfoResolver behind a static property.
* Consolidate JsonSerializerContext & IJsonTypeInfoResolver values to a single field.
* Move reflection fallback logic away from JsonSerializerContext and into JsonSerializerOptions

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs

* remove testing of removed field

Simplify the JsonTypeInfo.CreateObject implemenetation (#2)

* Simplify the JsonTypeInfo.CreateObject implemenetation

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoOfT.cs

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoOfT.cs

Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com>

Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com>

Tests and fixes for JsonTypeInfoKind.None

TypeInfo type mismatch tests

Allow setting NumberHandling on JsonTypeInfoKind.None

test resolver returning wrong type of options

JsonTypeInfo/JsonPropertyInfo mutability tests

rename test file

Move default converter rooting responsibility behind DefaultJsonTypeInfoResolver (#3)

* Move default converter rooting responsibility behind DefaultJsonTypeInfoResolver

* address feedback

Add simple test for using JsonTypeInfo<T> with APIs directly taking it

fix and tests for untyped/typed CreateObject

uncomment test cases, remove todo

More tests and tiny fixes

Add a JsonTypeInfoResolver.Combine test for JsonSerializerContext (#4)

* Fix JsonTypeInfoResolver.Combine for JsonSerializerContext

* Break up failing test

Fix simple scenarios for combining contexts (#6)

* Fix simple scenarios for combining contexts

* feedback

JsonSerializerContext combine test with different camel casing

Remove unneeded virtual calls & branching when accessing Get & Set delegates (#7)

JsonPropertyInfo tests everything minus ShouldSerialize & NumberHandling

Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs

Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs

throw InvalidOperationException rather than ArgumentNullException for source gen when PropertyInfo.Name is assigned through JsonPropertyInfoValues

tests for duplicated property names and JsonPropertyInfo.NumberHandling

Add tests for NumberHandling and failing tests for ShouldSerialize

disable the failing test and add extra checks

disable remainder of the failing ShouldSerialize tests, fix working one

Fix ShouldSerialize and IgnoreCondition interop

Add failing tests for CreateObject + parametrized constructors

Fix CreateObject support for JsonConstructor types (#10)

* Fix CreateObject support for JsonConstructor types

* address feedback

Make contexts more combinator friendly (#9)

* Make contexts more combinator friendly

* remove converter cache

* redesign test to account for JsonConstructorAttribute

* Combine unit tests

* address feedback

* Add acceptance tests for DataContract attributes & Specified pattern (#11)

* Add private field serialization acceptance test (#13)

* tests, PR feedback (#14)

* PR feedback and extra tests

* Shorten class name, remove incorrect check (not true for polimorphic cases)

* Make parameter matching for custom properties map property Name with parameter (#16)

* Test static initialization with JsonTypeInfo (#17)

* Fix test failures and proper fix this time (#18)

* Fix test failures and proper fix this time

* reinstate ActiveIssueAttribute

* PR feedback and adjust couple of tests which don't set TypeInfoResolver

* fix IAsyncEnumerable tests

* Lock JsonSerializerOptions in JsonTypeInfo.EnsureConfigured()

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
yowl pushed a commit to yowl/runtimelab that referenced this pull request May 17, 2023
runtimelab-bot pushed a commit that referenced this pull request Jun 8, 2023
…7189)

This fixes a startup crash on Big Sur:

> error: * Assertion at /Users/runner/work/1/s/src/mono/mono/utils/mono-hwcap-arm64.c:35, condition `res == 0' not met

Because sysctl can't find some of these options:

    $ sysctl hw.optional.armv8_crc32
    hw.optional.armv8_crc32: 1
    $ sysctl hw.optional.arm.FEAT_RDM
    sysctl: unknown oid 'hw.optional.arm.FEAT_RDM'
    $ sysctl hw.optional.arm.FEAT_DotProd
    sysctl: unknown oid 'hw.optional.arm.FEAT_DotProd'
    $ sysctl hw.optional.arm.FEAT_SHA1
    sysctl: unknown oid 'hw.optional.arm.FEAT_SHA1'
    $ sysctl hw.optional.arm.FEAT_SHA256
    sysctl: unknown oid 'hw.optional.arm.FEAT_SHA256'
    $ sysctl hw.optional.arm.FEAT_AES
    sysctl: unknown oid 'hw.optional.arm.FEAT_AES'

Full stack trace:

* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x0000010ef37560 libmonosgen-2.0.dylib`monoeg_assertion_message
    frame #1: 0x0000010ef375cc libmonosgen-2.0.dylib`mono_assertion_message + 32
    frame #2: 0x0000010ef40d6c libmonosgen-2.0.dylib`mono_hwcap_arch_init + 544
    frame #3: 0x0000010ef54bd8 libmonosgen-2.0.dylib`mono_hwcap_init + 72
    frame #4: 0x0000010ee14dc0 libmonosgen-2.0.dylib`parse_optimizations + 52
    frame #5: 0x0000010edbed48 libmonosgen-2.0.dylib`mono_init
    frame #6: 0x0000010ee18968 libmonosgen-2.0.dylib`mono_jit_init_version
    frame #7: 0x0000010f48a300 libxamarin-dotnet-debug.dylib`xamarin_bridge_initialize + 216
    frame #8: 0x0000010f4900a4 libxamarin-dotnet-debug.dylib`xamarin_main + 376
VivianaDuenas added a commit that referenced this pull request Jul 25, 2023
* pass args to BDN so they can be parsed (#2)
---------
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
runtimelab-bot pushed a commit that referenced this pull request Aug 17, 2023
SingleAccretion added a commit to SingleAccretion/runtimelab that referenced this pull request Sep 12, 2023
runtimelab-bot pushed a commit that referenced this pull request Nov 13, 2023
…0436)

* Enable IL trim for WASM by default

* Make ILStrip available for local build

* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it

* Add back accidentally removed line of code

* Update test to accommodate IL trim with WASM AOT

* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter

* Update var name

* Attempt to fix rebuild test failures

* Attempt to fix the file open issue with unicode on windows

* Attempt to fix unicode issue #2

* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms

* Add comment

* Update comment

* Fix file indentation format

* Check if string contains non-ascii char

* Remove unused callback

* Remove redundant comment

* Update method name

* Fixed some method not found issues and remove the optimization for g_fopen

* Fix tailcall

* Disable tailcall optimization when calling a trimmed method

* Free method header

* Fix windows build error

* Free method header at the correct locatioin

* Fix the condition of skipping tailcall

* Fix test failure

* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.

* Fix virtual tail call

* Address review feedback

* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list

* Put trimmed assemblies in IntermediateOutputPath

* Remove TrimmedAssemblies

* Create trimmed assembly folder before the parallel run

* Try to fix the issue with missing item

* Fix parallelism issue

* Only start the trim when the assembly is newer than the output

* Add assembly item to the list, when

* Add some logging

* Fixed runtimeconfig.json file path issue and disabed failed tests

* Update parameter name

* Fix wasi build

* Use the correct parameter

* Fix runtime test failure

* WasmAppBuilder: runtimeconfig.json path can be null

* cleanup

* ILStrip: fix typo in id name

* Cleanup

* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.

* more cleanup

* Re-enable disabled tests

* Change the default value for WasmStripILAfterAOT to false

* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds

* Move the location of file deleting

* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK

* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish

* Add _WasmSatelliteAssemblies to WasmAssembliesFinal

* Add a wasm template test

* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets

* Add a blazor template test

* Address review feedback

* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs

Co-authored-by: Ankit Jain <radical@gmail.com>

* Update parameter name

* Update usage of parameter

* Revert EmccCompile change

* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes

* Compress -> GZipCompress, and cleanup

* rework the tests

- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup

* ILStrip.cs: Emit a message about stripping to make it obvious to the user

* WasmApp.targets: update comment

* Change default value to false and update test

---------

Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
runtimelab-bot pushed a commit that referenced this pull request Nov 29, 2023
Fixes #95367.

Relevant part of the JitDump:

```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
               [000070] DA---------                         *  STORE_LCL_VAR ubyte  V10 tmp9
               [000057] -----------                         \--*  CAST      int <- ubyte <- int
               [000006] -----------                            \--*  EQ        int
               [000004] -----------                               +--*  LCL_VAR   ref    V02 tmp1          (last use)
               [000055] H----------                               \--*  CNS_INT(h) ref     'Frozen EmptyPartition`1<Int32> object'

Assertion prop for index #1 in BB04:
               [000006] -----------                         *  EQ        int
GenTreeNode creates assertion:
               [000070] DA---+-----                         *  STORE_LCL_VAR ubyte  V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2

fgMorphTree BB04, STMT00021 (after)
               [000070] DA---+-----                         *  STORE_LCL_VAR ubyte  V10 tmp9
               [000055] H----+-----                         \--*  CNS_INT(h) int
```

The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
runtimelab-bot pushed a commit that referenced this pull request Jan 8, 2024
…5292)

* Add IndentText json option

* Add IndentText for json source generator

* Add tests

* IndentText must be non-nullable

* Improve performance

* Add extra tests

* Cleanup

* Apply suggestions from code review

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>

* Fixes following code review

* Fixes following code review #2

* Add tests for invalid characters

* Handle RawIndent length

* Move all to RawIndentation

* Update documentation

* Additional fixes from code review

* Move to the new API

* Extra fixes and enhancements

* Fixes from code review

* Avoid introducing extra fields in JsonWriterOptions

* Fix OOM error

* Use bitwise logic for IndentedOrNotSkipValidation

* Cache indentation options in Utf8JsonWriter

* Add missing test around indentation options

* New fixes from code review

* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs

* Add test to check default values of the JsonWriterOptions properties

* Fix comment

---------

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
dicej referenced this pull request in dicej/runtimelab Aug 1, 2024
* [wasm] Bump emscripten to 3.1.56

* Replace Module.asm with Module.wasmExports

Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816

* Updates for .native.worker.js -> mjs rename

Context: emscripten-core/emscripten#21041

* Update deps

* Add general testing feed

* Update mode deps

* Update path

* Use current python packages for now, we don't have newer ones

The current names 3.1.34 are new enough

* Keep using llvm 16 for runtime and aot compiler

* Add -Wno-pre-c11-compat only for browser

* Temporarily disable version checks to get further

* Temporarily disable version checks to get further #2

* Disable -Wunused-command-line-argument

* Update emsdk deps

* Update icu dependency

* Revert "Temporarily disable version checks to get further #2"

This reverts commit 3f8834f2a83405bdb46ffe4ae46560ce7c8755e3.

* Revert "Temporarily disable version checks to get further"

This reverts commit fe1e5c643c6ab4bbfeb1af06f1f13492722825b9.

* Fix emsdk check

We use system python on osx too

* Workaround wasm-opt crash

* Workaround wasm-opt crash

* Workaround wasm-opt crash

* Fix WBT test

* Feedback

* Update ICU dependency

* Update emscripten deps

* Revert "Workaround wasm-opt crash"

This reverts commit 200cf3b3915d7e308414387628049cc710196992.

* Revert "Workaround wasm-opt crash"

This reverts commit 4530edfdcc64dd60d16f276a58fb7e3e5ede867d.

* Revert "Workaround wasm-opt crash"

This reverts commit 3593c41798f6c667a1778859f5576d8cfc723d5d.

* Increase tests timeout

* Show test progress

* Increase MT library tests timeout

* Disable WBT tests with SkiaSharp

* Increase helix tests timeout on browser

* Increase WBT timeout

* Increase initial heap sizes

* Fix mono_wasm_load_runtime cwrap signature

Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`

* Enable XunitShowProgress for threading tasks tests

* Try to reduce number of parallel AOT compilations

To check whether it will improve memory issues on CI

* Use new docker image for helix/windows tests

* Revert "Try to reduce number of parallel AOT compilations"

This reverts commit 5d9a6d2352e1df268a591320ac36ed62b71f8c91.

* Reduce the timeouts

* Reduce intitial heap size

* use active issues for MT

* Remove testing channel from nuget config, update deps

* Update emsdk and icu dependencies

---------

Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
yowl pushed a commit to yowl/runtimelab that referenced this pull request Sep 17, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range

* bug dotnet#2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type

* bug dotnet#3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)

* bug dotnet#4: document the fact that IOException can be thrown

* bug dotnet#5: throw SerializationException rather than OverflowException when parsing the decimal fails

* bug dotnet#6: 0 and 17 are illegal values for PrimitiveType enum

* bug dotnet#7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants