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

eliminate explicit dependency for STJ on newer frameworks #515

Closed
thompson-tomo opened this issue Apr 13, 2024 · 7 comments · Fixed by #516
Closed

eliminate explicit dependency for STJ on newer frameworks #515

thompson-tomo opened this issue Apr 13, 2024 · 7 comments · Fixed by #516

Comments

@thompson-tomo
Copy link
Contributor

thompson-tomo commented Apr 13, 2024

Is your feature request related to a problem? Please describe.
I want to minimise dependencies in my project by utilising framework dependencies wherever possible

Describe the solution you'd like
I want the package to have conditions placed on System.Text.Json so that it can be provided by the framework. Same thing for System.ComponentModel.Annotations

Describe alternatives you've considered
Accept the additional dependency

Additional context
n/a

@ardalis
Copy link
Owner

ardalis commented Apr 14, 2024

What additional TFM are you looking for? What, specifically, needs to change to fix this issue?

@thompson-tomo thompson-tomo changed the title Add additional TFM to eliminate explicit dependency on STJ eliminate explicit dependency for STJ on newer frameworks Apr 14, 2024
@thompson-tomo
Copy link
Contributor Author

@ardalis Will submit a pr which will probs be the easiest way to describe it

@fiseni
Copy link

fiseni commented Apr 24, 2024

Related to dependencies, we should consider this as well.
Perhaps as part of another PR, we need to clean and consolidate them.

@thompson-tomo
Copy link
Contributor Author

@fiseni I have adjusted the condition as suggested and even enabled global package reference for sonar & sourcelink. This meant i needed to add suppressions in.

@fiseni
Copy link

fiseni commented Apr 25, 2024

Why we're suppressing all these messages? These are all valid suggestions. Example

[SuppressMessage("Minor Code Smell", "S6602:\"Find\" method should be used instead of the \"FirstOrDefault\" extension", Justification = "<Pending>")]

@fiseni
Copy link

fiseni commented Apr 25, 2024

Now I remember we're treating warnings as errors, right? Ok then, great. We'll tackle all those code smells in the future.

@thompson-tomo
Copy link
Contributor Author

Correct warnings are being treated as errors & the projects which got suppressions previously didn't have analysis enabled hence the suppression.

ardalis added a commit that referenced this issue Apr 28, 2024
* #515 make STJ only included for net standard

* Moved to global package refs & add suppressions

* Make System.ComponentModel.Annotations oonly for net std

* Styling fixes.

---------

Co-authored-by: Steve Smith <steve@kentsmiths.com>
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 a pull request may close this issue.

3 participants