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

Upgrade to YamlDotNet version 12.3.1 #8373

Merged
merged 1 commit into from
Jan 29, 2023
Merged

Conversation

lahma
Copy link
Contributor

@lahma lahma commented Jan 28, 2023

This PR contains code changes required to get latest YamlDotNet version to compile and run.

  • some string usage has changed to more typed, like TagName and AnchorName
  • exception's Message does no longer contain the location, need to use ToString() to get same format as expected before
  • SerializationOptions was removed, but as it's configuration data in docfx, easiest to copy old version to the project
  • Custom ExclusiveObjectGraphVisitor which behaves like the one in 6.x library
  • I also added extra caching layer to EmitTypeInspector when there are no property extension and can use statically calculated data, this almost halved the memory allocations for PropertyDescriptor in my testing project, from 516MB to 260MB

@lahma lahma force-pushed the upgrade-yamldotnet branch from 6b0619f to 03a96df Compare January 28, 2023 13:31
@lahma

This comment was marked as resolved.

@lahma lahma force-pushed the upgrade-yamldotnet branch from 03a96df to d57ee1e Compare January 29, 2023 08:04
@codecov
Copy link

codecov bot commented Jan 29, 2023

Codecov Report

Base: 75.75% // Head: 76.81% // Increases project coverage by +1.06% 🎉

Coverage data is based on head (619b58a) compared to base (6d1bdfe).
Patch coverage: 94.87% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8373      +/-   ##
==========================================
+ Coverage   75.75%   76.81%   +1.06%     
==========================================
  Files         944      940       -4     
  Lines       36661    35281    -1380     
==========================================
- Hits        27771    27101     -670     
+ Misses       8890     8180     -710     
Impacted Files Coverage Δ
...soft.DocAsCode.YamlSerialization/YamlSerializer.cs 68.85% <66.66%> (ø)
...ft.DocAsCode.YamlSerialization/YamlDeserializer.cs 83.80% <93.75%> (-0.23%) ⬇️
...Microsoft.DocAsCode.Build.Common/MarkdownReader.cs 86.30% <100.00%> (ø)
...ld.ManagedReference/BuildOutputs/ApiBuildOutput.cs 92.00% <100.00%> (ø)
...verwriteDocuments/OverwriteDocumentModelCreater.cs 96.93% <100.00%> (ø)
...osoft.DocAsCode.Build.TableOfContents/TocHelper.cs 87.71% <100.00%> (ø)
...cAsCode.Build.UniversalReference/ModelConverter.cs 75.00% <100.00%> (-0.45%) ⬇️
...ObjectGraphVisitors/ExclusiveObjectGraphVisitor.cs 100.00% <100.00%> (ø)
...lSerialization/TypeInspectors/EmitTypeInspector.cs 91.23% <100.00%> (ø)
...ta.ManagedReference.Roslyn/Visitors/NameVisitor.cs 0.00% <0.00%> (-53.11%) ⬇️
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lahma lahma force-pushed the upgrade-yamldotnet branch 2 times, most recently from db0fed8 to cbcecfe Compare January 29, 2023 08:32
@lahma lahma force-pushed the upgrade-yamldotnet branch from cbcecfe to 619b58a Compare January 29, 2023 08:33
@lahma lahma marked this pull request as ready for review January 29, 2023 08:53
@yufeih yufeih merged commit 31e06ad into dotnet:main Jan 29, 2023
@yufeih
Copy link
Contributor

yufeih commented Jan 29, 2023

Thanks for your contribution! @lahma

@lahma lahma deleted the upgrade-yamldotnet branch January 29, 2023 10:22
@yufeih yufeih added the engineering Makes the pull request to appear in the "Engineering" section of the next release note label Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Makes the pull request to appear in the "Engineering" section of the next release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants