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

Added readonly modifier to private fields which are never changed #1451

Merged
merged 3 commits into from
Aug 3, 2023
Merged

Conversation

Lehonti
Copy link
Contributor

@Lehonti Lehonti commented Aug 2, 2023

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature (N/A)
  • I have successfully run a local build

@martincostello
Copy link
Member

Thanks for your contribution.

As you can see, the build is now failing due to readonly being incompatible with other uses of these fields in the code. It may be that all of these fields are already not readonly for that very reason.

Please run the build locally and fix any issues to continue with this contribution.

@Lehonti
Copy link
Contributor Author

Lehonti commented Aug 3, 2023

You are absolutely right.

I managed to reproduce the errors in my local environment, and removed the problematic readonly modifiers. As you can see, there are now less files that have been modified when we compare the PR code to the original (used to be 9, now they are 6).

@martincostello
Copy link
Member

The changes are now hitting lint errors. Please get a full clean build locally before pushing further changes.

@Lehonti
Copy link
Contributor Author

Lehonti commented Aug 3, 2023

No problem. I planned to fix the linting issues in a future PR, but I didn't have any idea that they were configured to make a build fail. It's understandable, of course. You want to keep the code clean.

The built succeeded in my machine without errors or warnings.

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #1451 (8799e05) into main (f8bea05) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1451   +/-   ##
=======================================
  Coverage   83.90%   83.90%           
=======================================
  Files         273      273           
  Lines        6516     6516           
  Branches     1012     1012           
=======================================
  Hits         5467     5467           
  Misses        840      840           
  Partials      209      209           
Flag Coverage Δ
linux 83.90% <ø> (ø)
macos 83.90% <ø> (ø)
windows 83.90% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/Polly/Caching/AsyncCachePolicy.cs 100.00% <ø> (ø)
src/Polly/Caching/CachePolicy.cs 100.00% <ø> (ø)
src/Polly/Timeout/AsyncTimeoutPolicy.cs 87.87% <ø> (ø)
src/Polly/Timeout/TimeoutPolicy.cs 86.66% <ø> (ø)
src/Polly/Wrap/AsyncPolicyWrap.cs 80.51% <ø> (ø)
src/Polly/Wrap/PolicyWrap.cs 80.28% <ø> (ø)

@martincostello martincostello merged commit 77e91d5 into App-vNext:main Aug 3, 2023
16 checks passed
@martincostello
Copy link
Member

Thanks!

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.

2 participants