Skip to content

Vendor Newtonsoft.Json 12.0.1#838

Merged
zacharycmontoya merged 6 commits into
masterfrom
zach/vendor/newtonsoft
Aug 20, 2020
Merged

Vendor Newtonsoft.Json 12.0.1#838
zacharycmontoya merged 6 commits into
masterfrom
zach/vendor/newtonsoft

Conversation

@zacharycmontoya

Copy link
Copy Markdown
Contributor

Summary

This PR vendors Newtonsoft.Json 12.0.1 which removes the assembly dependency on Newtonsoft.Json.dll for all target frameworks.

Changes

  1. Adding the source of Newtonsoft.Json 12.0.1 into the Vendors folder and prefixing the namespaces with Datadog
  2. Revising 3rd party license file
  3. Normalizing line endings for the output of the UpdateVendors tool

Current Usages

  1. Deserialize the (small) response from the Trace agent after submitting traces
  2. Deserialize an input datadog.json configuration file
  3. Deserialize DD_TRACE_SAMPLING_RULES
  4. Serialize startup diagnostic logs into a JSON object

Results

Reduces the assembly dependencies of `Datadog.Trace in the following ways:

  • All target frameworks
    • Newtonsoft.Json.dll

@DataDog/apm-dotnet

@zacharycmontoya zacharycmontoya added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) dependencies Pull requests that update a dependency file labels Aug 5, 2020
@zacharycmontoya
zacharycmontoya requested a review from a team as a code owner August 5, 2020 20:10
@zacharycmontoya zacharycmontoya self-assigned this Aug 5, 2020
<!--Newtonsoft.Json-->
<!-- Original condition was only for net45, but we include net461 here so that net45 and net461 generate the same Newtonsoft.Json -->
<PropertyGroup Condition="'$(TargetFramework)'=='net45' OR '$(TargetFramework)'=='net461'">
<DefineConstants>$(DefineConstants);HAVE_ADO_NET;HAVE_APP_DOMAIN;HAVE_ASYNC;HAVE_BIG_INTEGER;HAVE_BINARY_FORMATTER;HAVE_BINARY_SERIALIZATION;HAVE_BINARY_EXCEPTION_SERIALIZATION;HAVE_CAS;HAVE_CHAR_TO_LOWER_WITH_CULTURE;HAVE_CHAR_TO_STRING_WITH_CULTURE;HAVE_COM_ATTRIBUTES;HAVE_COMPONENT_MODEL;HAVE_CONCURRENT_COLLECTIONS;HAVE_COVARIANT_GENERICS;HAVE_DATA_CONTRACTS;HAVE_DATE_TIME_OFFSET;HAVE_DB_NULL_TYPE_CODE;HAVE_DYNAMIC;HAVE_EMPTY_TYPES;HAVE_ENTITY_FRAMEWORK;HAVE_EXPRESSIONS;HAVE_FAST_REVERSE;HAVE_FSHARP_TYPES;HAVE_FULL_REFLECTION;HAVE_GUID_TRY_PARSE;HAVE_HASH_SET;HAVE_ICLONEABLE;HAVE_ICONVERTIBLE;HAVE_IGNORE_DATA_MEMBER_ATTRIBUTE;HAVE_INOTIFY_COLLECTION_CHANGED;HAVE_INOTIFY_PROPERTY_CHANGING;HAVE_ISET;HAVE_LINQ;HAVE_MEMORY_BARRIER;HAVE_METHOD_IMPL_ATTRIBUTE;HAVE_NON_SERIALIZED_ATTRIBUTE;HAVE_READ_ONLY_COLLECTIONS;HAVE_REFLECTION_EMIT;HAVE_SECURITY_SAFE_CRITICAL_ATTRIBUTE;HAVE_SERIALIZATION_BINDER_BIND_TO_NAME;HAVE_STREAM_READER_WRITER_CLOSE;HAVE_STRING_JOIN_WITH_ENUMERABLE;HAVE_TIME_SPAN_PARSE_WITH_CULTURE;HAVE_TIME_SPAN_TO_STRING_WITH_CULTURE;HAVE_TIME_ZONE_INFO;HAVE_TRACE_WRITER;HAVE_TYPE_DESCRIPTOR;HAVE_UNICODE_SURROGATE_DETECTION;HAVE_VARIANT_TYPE_PARAMETERS;HAVE_VERSION_TRY_PARSE;HAVE_XLINQ;HAVE_XML_DOCUMENT;HAVE_XML_DOCUMENT_TYPE;HAVE_CONCURRENT_DICTIONARY</DefineConstants>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wow. I can feel the pain from the Newtonsoft maintainers

@zacharycmontoya
zacharycmontoya merged commit 7b9bd2b into master Aug 20, 2020
@zacharycmontoya
zacharycmontoya deleted the zach/vendor/newtonsoft branch August 20, 2020 19:13
@zacharycmontoya zacharycmontoya added this to the 1.19.2 milestone Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants