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

add JsonNet13, bump dependencies, fix naming #290

Open
wants to merge 3 commits into
base: v2
Choose a base branch
from

Conversation

Misiu
Copy link

@Misiu Misiu commented Apr 2, 2024

I've removed three projects (JsonNet10, JsonNet11, JsonNet9) and added a new project (JsonNet13).
The runtimeOptions property in the RuntimeConfig class was marked as obsolete and replaced with RuntimeOptions. The version of System.Data.SqlClient in SqlClientApp.csproj was updated from 4.8.3 to 4.8.6.

This is my first contribution, before starting to use the project in my POC.
I plan to clean the naming and add comments to public classes that currently miss them.

My old app (Autofac based) uses expressions and three lifetime scopes, so hopefully I'll be able to replace Autofac with your library and simplify the logic as much as possible.

Remove three projects (JsonNet10, JsonNet11, JsonNet9).
Add new project (JsonNet13).
The `runtimeOptions` property in the `RuntimeConfig` class was marked as obsolete and replaced with `RuntimeOptions`.
The version of `System.Data.SqlClient` in `SqlClientApp.csproj` was updated from 4.8.3 to 4.8.6.
@Misiu Misiu requested a review from natemcmaster as a code owner April 2, 2024 10:17
Copy link
Owner

@natemcmaster natemcmaster left a comment

Choose a reason for hiding this comment

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

Hey, thanks for sending your first pull request to this project! I have a few questions about what you are trying to accomplish with these changes. I posted a few inline in the code.

Thanks for contributing!

Comment on lines -20 to -25
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonNet10", "test\TestProjects\JsonNet10\JsonNet10.csproj", "{FFBDDBE3-3E51-4CE6-BDF6-04AB66FFF658}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonNet11", "test\TestProjects\JsonNet11\JsonNet11.csproj", "{F2937B44-20B4-4E74-B5F5-99AF465424F3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonNet9", "test\TestProjects\JsonNet9\JsonNet9.csproj", "{D71D858B-35AF-452F-926F-873DDD990B27}"
EndProject
Copy link
Owner

Choose a reason for hiding this comment

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

What was the motivation for removing these projects from the solution file?

Copy link
Author

Choose a reason for hiding this comment

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

Newtonsoft.JSON 9-12 have at least one high vulnerability (https://www.nuget.org/packages/Newtonsoft.Json/12.0.3).
I think those old versions shouldn't be supported, that's why I've added a new project with version 13.0.3

src/Plugins/Internal/RuntimeConfig.cs Outdated Show resolved Hide resolved
@@ -133,6 +127,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mixer", "samples\dynamic-im
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceImplementation", "samples\dynamic-implementation\ServiceImplementation\ServiceImplementation.csproj", "{39BCFE6F-50C4-45AE-8D13-38FB423AB619}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonNet13", "test\TestProjects\JsonNet13\JsonNet13.csproj", "{9F7041CA-98DE-4DFD-8BFC-71B0338D4CB0}"
Copy link
Owner

Choose a reason for hiding this comment

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

How will this new test project be used? I did not see anything which references it, so I'm not sure if this is needed or not.

Copy link
Author

Choose a reason for hiding this comment

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

I've added this project as a replacement for 9,10,11 versions.
The tests are empty for those projects (https://github.com/natemcmaster/DotNetCorePlugins/blob/v2/test/TestProjects/JsonNet11/Class1.cs), so this can be added in the future.
The idea was to remove all libraries that have vulnerabilities

Copy link
Owner

Choose a reason for hiding this comment

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

Ok. These old versions were selected intentionally because this loader is trying to assert that it can load different major versions of an assembly. As this is test-only code, I am not concerned about security vulnerabilities.

Copy link

codecov bot commented Apr 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 53.73%. Comparing base (e1e4567) to head (10283fe).

❗ Current head 10283fe differs from pull request most recent head 9253a06. Consider uploading reports for the commit 9253a06 to get more accurate results

Files Patch % Lines
src/Plugins/Loader/RuntimeConfigExtensions.cs 0.00% 5 Missing ⚠️
src/Plugins/Internal/RuntimeConfig.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##               v2     #290       +/-   ##
===========================================
- Coverage   66.80%   53.73%   -13.07%     
===========================================
  Files          14       14               
  Lines         494      495        +1     
  Branches        0      126      +126     
===========================================
- Hits          330      266       -64     
- Misses        164      185       +21     
- Partials        0       44       +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants