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

chore: dotnet format PRs #3097

Merged
merged 17 commits into from
Jan 31, 2024
Merged

chore: dotnet format PRs #3097

merged 17 commits into from
Jan 31, 2024

Conversation

bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Jan 30, 2024

Fixes #1503
Because I don't want to nitpick or talk about tabs vs spaces.
#skip-changelog

@bitsandfoxes bitsandfoxes changed the title chore: Auto-Format PRs chore: dotnet format PRs Jan 30, 2024
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 81 lines in your changes are missing coverage. Please review.

Comparison is base (e0d87e4) 75.74% compared to head (24ae41a) 76.12%.

❗ Current head 24ae41a differs from pull request most recent head 3812c56. Consider uploading reports for the commit 3812c56 to get more accurate results

Files Patch % Lines
src/Sentry/Force.Crc32/Crc32Algorithm.cs 9.09% 38 Missing and 2 partials ⚠️
src/Sentry/Force.Crc32/SafeProxy.cs 45.94% 19 Missing and 1 partial ⚠️
...Sentry/Internal/SynchronizedRandomValuesFactory.cs 40.00% 3 Missing ⚠️
src/Sentry/PlatformAbstractions/RuntimeInfo.cs 57.14% 2 Missing and 1 partial ⚠️
src/Sentry/Extensibility/DisabledHub.cs 0.00% 1 Missing and 1 partial ⚠️
src/Sentry/MetricAggregator.cs 66.66% 1 Missing and 1 partial ⚠️
src/Sentry/SentryOptionsExtensions.cs 50.00% 2 Missing ⚠️
...droid.AssemblyReader/AndroidAssemblyStoreReader.cs 0.00% 0 Missing and 1 partial ⚠️
src/Sentry.AspNetCore/DefaultUserFactory.cs 0.00% 0 Missing and 1 partial ⚠️
...rce/Internal/DiagnosticSource/SentrySqlListener.cs 0.00% 0 Missing and 1 partial ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3097      +/-   ##
==========================================
+ Coverage   75.74%   76.12%   +0.38%     
==========================================
  Files         357      357              
  Lines       13463    13468       +5     
  Branches     2670     2670              
==========================================
+ Hits        10197    10253      +56     
+ Misses       2590     2533      -57     
- Partials      676      682       +6     

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

@bitsandfoxes bitsandfoxes marked this pull request as ready for review January 30, 2024 14:14
Copy link
Collaborator

@jamescrosswell jamescrosswell left a comment

Choose a reason for hiding this comment

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

Nice (once the checks/errors have been dealt with)!

Comment on lines 18 to 19
[RequiresDynamicCode("Calls Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(Object)")]
[RequiresUnreferencedCode("Calls Microsoft.Extensions.Configuration.ConfigurationBinder.Bind(Object)")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jamescrosswell do you know by chance what's up with that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No idea. At first glance, the Check failure is nonsense.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So we added the code it's complaining about in b84faa8... the whole purpose of which was to avoid Dynamic Code in the configuration binding.

The inclusion of Microsoft.Extensions.Configuration.Binder and setting <EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator> in the project file mean that call to Bind will be replaced by a source generated binder... so there isnt' any dynamic code.

If we add the two attributes above, it will break AOT Compatibility (unecessarily).

@bitsandfoxes bitsandfoxes merged commit bd62cf0 into main Jan 31, 2024
30 checks passed
@bitsandfoxes bitsandfoxes deleted the chore/dotnet-format branch January 31, 2024 15:21
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.

dotnet format fails to run
4 participants