1. 12 7月, 2022 24 次提交
    • I
      Improve Generics support in System.Text.Json.SourceGeneration (#71619) · 0cd5fe5c
      Ilya Pospelov 提交于
      * Improve Generics support in System.Text.Json.SourceGeneration
      
      * Apply suggestions
      
      * Apply suggestions 2
      
      * unify first element check
      
      * apply code styles
      0cd5fe5c
    • A
      [wasm] Disable `S.T.RegularExpressions FunctionalTests` tests failing due to linker issues (#71875) · cf832731
      Ankit Jain 提交于
      * [wasm] Disable tests failing on HighResourceAOT job
      
      - Disabling `FunctionalTests/System.Text.RegularExpressions.Tests` this
        test for HighResourceAOT
      - Also, ensure that the HighResourceAOT tests are run for regular
        library tests, and EAT.
      
      Issue: https://github.com/dotnet/runtime/issues/71848
      
      * Disable for EAT also
      
      * [wasm] Disable some STJ.Serialization tests failing due to linker issues
      
      This seems to be hit only with `EnableAggressiveTrimming=true`, and
      `RunAOTCompilation=true`. All the traces are similar to:
      
      ```
      [FAIL] System.Text.Json.Serialization.Tests.CollectionTestsDynamic_AsyncStreamWithSmallBuffer.InvalidPropertyNameFail(policyType: typeof(System.Text.Json.Serialization.Tests.CollectionTests+KeyNameNullPolicy), offendingProperty: "Key")
      Assert.Throws() Failure
      Expected: typeof(System.InvalidOperationException)
      Actual:   typeof(System.NotSupportedException): Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
      ---- System.NotSupportedException : Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
         at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
         at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
         at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
         at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
         at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
         at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
      --- End of stack trace from previous location ---
         at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
         at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
      ----- Inner Stack Trace -----
         at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
         at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
         at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
         at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
         at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
         at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
      --- End of stack trace from previous location ---
         at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
         at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
      ```
      
      Issue: https://github.com/dotnet/runtime/issues/71838
      
      * Disable System.Text.Json.Serialization.Tests.PropertyNameTestsDynamic.JsonNameConflictOnCaseInsensitiveFail also
      
      * Disable another STJ failing test - https://github.com/dotnet/runtime/issues/71981
      
      * [wasm] Disable two more tests failing due to #71838
      cf832731
    • M
      Various createdump fixes. Smaller MacOS dump size, better logging/stats, misc... · f7671633
      Mike McLaughlin 提交于
      Various createdump fixes. Smaller MacOS dump size, better logging/stats, misc cleanup, etc. (#71569)
      
      * Fix where CombineMemoryRegions is called and perf fix for PAGE_SIZE on MacOS M1
      
      * Remove MEMORY_REGION_FLAG_MEMORY_BACKED flags because it was always set now
      
      * Add better memory tracing and memory region stats
      
      Fix MacOS native module regions when overlapping with existing.
      
      Fix MacOS adding the managed modules to the module mapping list before the "other mappings" is built.
      
      * Don't add share_mode == SM_EMPTY regions
      
      * Add crashreport success status message for VS4Mac
      
      * Launch createdump from SIGTERM handler directly to reduce the time it takes to get the crash report/dump for VS4Mac
      
      * Fix issue https://github.com/dotnet/runtime/issues/71561
      
      * Add target process terminated/alive message
      
      * Add total createdump elapsed time message
      f7671633
    • J
    • E
    • P
      [wasm] Fix some failing `System.Runtime.InteropServices.JavaScript.Tests` (#71976) · 5ab41751
      Pavel Savara 提交于
      * protect class names from mangling
      
      * [wasm] Fix `JSImportExportTest.JsImportObjectArray`
      
      .. failing as:
      
      ```
      [09:26:02] fail: [FAIL] System.Runtime.InteropServices.JavaScript.Tests.JSImportExportTest.JsImportObjectArray
      [09:26:02] info: System.Runtime.InteropServices.JavaScript.JSException : Error: Assert failed: ES6 module JavaScriptTestHelper was not imported yet, please call JSHost.Import() first.
      [09:26:02] info:     at mono_wasm_lookup_function (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:131530)
      [09:26:02] info:     at Object.mono_wasm_bind_js_function (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:129592)
      [09:26:02] info:     at _mono_wasm_bind_js_function (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:103196)
      [09:26:02] info:     at do_icall (do_icall (<anonymous>:wasm-function[320]):0x1d48)e
      [09:26:02] info:     at do_icall_wrapper (do_icall_wrapper (<anonymous>:wasm-function[290]):0x1c89)3
      [09:26:02] info:     at interp_exec_method (interp_exec_method (<anonymous>:wasm-function[228]):0xe11)9
      [09:26:02] info:     at interp_runtime_invoke (interp_runtime_invoke (<anonymous>:wasm-function[227]):0xcfe)5
      [09:26:02] info:     at mono_jit_runtime_invoke (mono_jit_runtime_invoke (<anonymous>:wasm-function[8109]):0x1a141)9
      [09:26:02] info:     at do_runtime_invoke (do_runtime_invoke (<anonymous>:wasm-function[2050]):0x84c9)3
      [09:26:02] info:     at mono_runtime_try_invoke (mono_runtime_try_invoke (<anonymous>:wasm-function[2055]):0x852f)b
      [09:26:02] info:     at mono_runtime_invoke (mono_runtime_invoke (<anonymous>:wasm-function[2082]):0x873b)a
      [09:26:02] info:     at mono_wasm_invoke_method_ref (mono_wasm_invoke_method_ref (<anonymous>:wasm-function[121]):0x9ce0)
      [09:26:02] info:     at Module._mono_wasm_invoke_method_ref (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:125660)
      [09:26:02] info:     at Object.t.<computed> (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:5668)
      [09:26:02] info:     at _call_method_with_converted_args (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:68736)
      [09:26:02] info:     at call_method_ref (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:67909)
      [09:26:02] info:     at /datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:69762
      [09:26:02] info:     at mono_call_assembly_entry_point (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:69894)
      [09:26:02] info:     at Object.mono_run_main (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:78650)
      [09:26:02] info:     at Object.init (test-main.js:495:47)
      [09:26:02] info:     at Object.onDotnetReady (test-main.js:439:17)
      [09:26:02] info:     at finalize_startup (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:120653)
      [09:26:02] info:     at mono_wasm_after_runtime_initialized (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:3:116586)
      [09:26:02] info:     at callRuntimeCallbacks (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:16200)
      [09:26:02] info:     at postRun (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:12076)
      [09:26:02] info:     at doRun (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:144539)
      [09:26:02] info:     at run (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:144696)
      [09:26:02] info:     at runCaller (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:144176)
      [09:26:02] info:     at removeRunDependency (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:12868)
      [09:26:02] info:     at receiveInstance (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:14757)
      [09:26:02] info:     at receiveInstantiationResult (/datadisks/disk1/work/98BF08F2/w/A36B0892/e/dotnet.js:12:14878)
      [09:26:02] info:    at System.Runtime.InteropServices.JavaScript.JSFunctionBinding.BindJSFunctionImpl(String functionName, String moduleName, ReadOnlySpan`1 signatures)
      [09:26:02] info:    at System.Runtime.InteropServices.JavaScript.JSFunctionBinding.BindJSFunction(String functionName, String moduleName, ReadOnlySpan`1 signatures)
      [09:26:02] info:    at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.createData(String name)
      [09:26:02] info:    at System.Runtime.InteropServices.JavaScript.Tests.JSImportExportTest.MarshalObjectArrayCases()+MoveNext()
      [09:26:02] info:    at System.Linq.Enumerable.SelectEnumerableIterator`2[[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object[], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      ```
      
      This is because the xunit is enumerating the member data before the
      static `InitializeAsync` has completed.  And this member data calls
      `JavaScriptTestHelper.createData("test")` before we are ready.
      
      Fixes https://github.com/dotnet/runtime/issues/71952 .
      Co-authored-by: NAnkit Jain <radical@gmail.com>
      5ab41751
    • K
      Refactor Rfc2898DeriveBytes to support spans · c7613b67
      Kevin Jones 提交于
      c7613b67
    • G
      Moved call to TryLoadGenericMetaTypeNullability (#71851) · 6cde4bed
      Grigory Sokolov 提交于
      * Moved call to TryLoadGenericMetaTypeNullability
      
      The TryLoadGenericMetaTypeNullability method was called with the same
      member info but varying nullability across the entire nullability
      hierarchy. Moved it one level up where nullability and member info are
      aligned.
      6cde4bed
    • M
      Break apart source-build intermediate which exceeds AzDO size limit (#71949) · 02f875be
      Michael Simons 提交于
      * Break apart runtime source-build intermediate which exceeds AzDO size limit
      
      * Fix typo
      02f875be
    • K
      2963ad1a
    • E
      Fix contract customization being silently ignored over pre-existing... · 5acaf49b
      Eirik Tsarpalis 提交于
      Fix contract customization being silently ignored over pre-existing JsonIgnoreCondition configuration (#71908)
      
      * Fix contract customization being ignored over prexisting JsonIgnoreCondition settings
      
      * Update src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/MetadataTests/DefaultJsonTypeInfoResolverTests.JsonPropertyInfo.cs
      
      * Revert to having `DefaultIgnoreCondition`/`IgnoreNullValues` settings being applied post-configuration.
      
      * Revert `JsonIgnoreCondition.Never` mapping
      
      * Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfoOfT.cs
      
      * Remove no longer needed test helpers
      
      * Remove unnecessary invalidator
      5acaf49b
    • D
      Allow ZipArchive to create duplicate entries (#69524) · b81da9fc
      David Cantú 提交于
      * Revert "throw exception when creating an entry name that already exists in ZipArchive (#60973)"
      
      This reverts commit 7a62468f.
      
      * Add tests for duplicate entries
      
      * use TryAdd
      b81da9fc
    • D
      [main] Update dependencies from dotnet/emsdk dotnet/icu (#71957) · ce617cb3
      dotnet-maestro[bot] 提交于
      * Update dependencies from https://github.com/dotnet/emsdk build 20220711.1
      
      Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
       From Version 7.0.0-preview.7.22357.1 -> To Version 7.0.0-preview.7.22361.1
      
      * Update dependencies from https://github.com/dotnet/icu build 20220711.1
      
      Microsoft.NETCore.Runtime.ICU.Transport
       From Version 7.0.0-preview.6.22313.1 -> To Version 7.0.0-preview.7.22361.1
      Co-authored-by: Ndotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
      ce617cb3
    • B
    • P
      [wasm] reduce eval in production code (#71932) · 4a2ebf20
      Pavel Savara 提交于
      * reduce eval in production code
      * fix for JSExport nested types
      * update benchmark to use JSExport/JSImport instead of reflection
      * fix console benchmark
      4a2ebf20
    • B
      Fix JitDoSsa=0 (#71789) · cae954ad
      Bruce Forstall 提交于
      If we don't do SSA, we don't do liveness, but Lowering depends on
      liveness-created lvDoNotEnregister, so if we're not doing SSA,
      at least run local var liveness. Note that in the MinOpts case,
      `lvSetMinOptsDoNotEnreg()` sets all locals to do-not-enregister.
      
      Fixes #62251
      cae954ad
    • S
      Fix the type check in "fgMorphMultiregStructArg" (#71937) · 037f6793
      SingleAccretion 提交于
      We cannot assume the underlying local has a layout.
      037f6793
    • I
      Added the option to get the compiler version from Crossgen2 (#67317) · ab8da92c
      Ivan Diaz Sanchez 提交于
      * Added a --version option to the Crossgen2 binary.
      
      * Changed to use AssemblyInformationalVersionAttribute.InformationalVersion, since that's the API that is being standardized in other tools.
      
      * Updated --version return code from 1 to 0.
      ab8da92c
    • V
      Don't use Newtonsoft.Json as a test dependency name in... · fededf1a
      Vitek Karas 提交于
      Don't use Newtonsoft.Json as a test dependency name in ResolveComponentDependencies host test. (#71946)
      
      Use a made up generic name in a test dependency. Using a valid NuGet package name can trigger repo-wide checks for stale versions of dependencies.
      
      In the case of this test it's just a name, the test actually doesn't use the binary (it makes up an empty file with that name).
      fededf1a
    • J
      JIT: Fix reordering with 'backfilled' arguments on x86 (#71940) · 52d9d0ca
      Jakob Botsch Nielsen 提交于
      In a previous change I made the assumption that all register args come
      before stack args on x86. This assumption is not true.
      
      Fix #71939
      52d9d0ca
    • B
      Improve Interop.Sys.ReadLink loop with stackalloc (#69335) · 9701c5c9
      Badre BSAILA 提交于
      * simplify code
      
      * redo comments
      
      * move GetLastPInvokeError around
      
      * work with spans
      
      * make constant name PascalCase
      9701c5c9
    • S
      Fixed issue #71641 (#71671) · f58e52e7
      SRV 提交于
      f58e52e7
    • D
      [main] Update dependencies from dotnet/runtime dotnet/runtime-assets... · 3ac16299
      dotnet-maestro[bot] 提交于
      [main] Update dependencies from dotnet/runtime dotnet/runtime-assets dotnet/roslyn-analyzers (#71938)
      
      * Update dependencies from https://github.com/dotnet/runtime build 20220708.7
      
      Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
       From Version 7.0.0-preview.6.22354.1 -> To Version 7.0.0-preview.7.22358.7
      
      * Update dependencies from https://github.com/dotnet/runtime-assets build 20220711.1
      
      Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
       From Version 7.0.0-beta.22357.1 -> To Version 7.0.0-beta.22361.1
      
      * Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220711.3
      
      Microsoft.CodeAnalysis.NetAnalyzers
       From Version 7.0.0-preview1.22329.1 -> To Version 7.0.0-preview1.22361.3
      Co-authored-by: Ndotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
      3ac16299
    • A
      e2c537c8
  2. 11 7月, 2022 16 次提交