Closed udlose closed 5 months ago
Failed TestExceptionStrategy7 [6 ms]
Error Message:
Test method Amazon.XRay.Recorder.UnitTests.AwsXrayRecorderBuilderTests.TestExceptionStrategy7 threw exception:
ThirdParty.LitJson.JsonException: Max allowed object depth reached while trying to export from type System.String
Stack Trace:
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 715
Looks like all failing tests are due to a recursive (infinite?) loop at the WriteValue() method.
ThirdParty.LitJson.JsonException: Max allowed object depth reached while trying to export from type System.String
Stack Trace:
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 715
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 792
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 850
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 850
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 783
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 850
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 850
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 783
at ThirdParty.LitJson.JsonMapper.WriteValue(Object obj, JsonWriter writer, Boolean writer_is_private, Int32 depth) in /_/sdk/src/Core/ThirdParty/LitJson/JsonMapper.cs:line 850
...
Can you fix the PR, and then we will review the change.
@jj22ee my apologies. I had a PITA time trying to get it to build successfully with all of the old dependencies used for backwards compatibility. So, I wasn't able to run any of the tests. I will try to take a look this weekend.
Do you have any tips on making it a little easier to build?
@udlose are there any specific dependencies you are having trouble with, and what kind of build pains are you running into?
@udlose are there any specific dependencies you are having trouble with, and what kind of build pains are you running into?
@jj22ee - the .NET Framework specific dependencies are problematic as I keep only the latest version installed on my laptop. I went and installed .NET Fx 4.62 and .Net Fx 4.51 Multi Targeting Packs. There are multiple references to the compilation symbol NET45 which apparently aren't covered by installing .NET Framework 4.51. I pulled NET45 out of the project dependencies to try and get it to build but there are several references to it in the code for conditional compilation. I don't want to have to do surgery on the code just to get it to compile correctly.
Several of these dependencies are EOL anyways so they really should be removed IMO:
@udlose I have pushed a fix into the PR branch:
To summarize, I've reduced the PR into essentially cherry-picking your upstream PR, alongside incorporating your change into the other existing code change to the copied LitJSON.
Issue #282
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.