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

Clean up the Polly code base #557

Closed
SeanFarrow opened this issue Jan 6, 2019 · 14 comments
Closed

Clean up the Polly code base #557

SeanFarrow opened this issue Jan 6, 2019 · 14 comments

Comments

@SeanFarrow
Copy link
Contributor

It would be nice to clean up the polly code base and in the process use C# 6+ features.

I'm intending to do the following:
Update all the Polly projects to use C# Language version 7.3.

Use features of C# 6+ including expression-bodied functions etc.
The only area of the codebase I will not be changing are the execute methods in the Polly policies due to issue #271.

@moerwald
Copy link
Contributor

I fired a small pull request #562. Is that what this topic should handle? Am I on the rigth way?

Thx

@SeanFarrow
Copy link
Contributor Author

SeanFarrow commented Jan 21, 2019 via email

@moerwald
Copy link
Contributor

Thx for clarification

@SeanFarrow
Copy link
Contributor Author

SeanFarrow commented Jan 21, 2019 via email

@reisenberger
Copy link
Member

I'd like to suggest please that we pause any changes between Action, local function and local method, until we have some concrete benchmarks supporting the change. Some early benchmarks I ran did not immediately support the change.

Further, in the doNothing case, other optimisations are also possible and should be explored: eg Action doNothing = null; with onRetry?.Invoke(...) (or similar) syntax elsewhere.

@moerwald
Copy link
Contributor

moerwald commented Jan 22, 2019

@SeanFarrow yes I'm still up for helping. Please decline my pull request #562. I'll create a new one.

@moerwald
Copy link
Contributor

moerwald commented Jan 22, 2019

@SeanFarrow new pull request for Registry Policy -> #564.

@reisenberger
Copy link
Member

Thanks @SeanFarrow and @moerwald !

Please be sure to branch from the head of the latest v7.0.0 dev branch for any code tidy-ups! There are some significant refactors to the architecture of all Polly policies in the v7.0.0 branch; any tidy-ups started from the current master code may well not merge.

Thanks again.

@SeanFarrow
Copy link
Contributor Author

SeanFarrow commented Jan 22, 2019 via email

@reisenberger
Copy link
Member

Thanks again @SeanFarrow and @moerwald for everything you are doing on clean-ups!

Any C#6/7 tidy-ups are great (except for changing between lambdas/local functions etc as discussed - will try to post some benchmarks on that), and so long as things are (currently) based on the v7.0.0 branch.

CachePolicy is the other one probably not to touch at the moment, as we have an open PR on that; the PR itself is good to merge, but I want to be sure we have the corresponding changes to Polly cache providers and serializers described in this comment ready before we merge cache changes in core Polly.

Thanks again!

@SeanFarrow
Copy link
Contributor Author

SeanFarrow commented Jan 24, 2019 via email

@reisenberger
Copy link
Member

Have you got any objections to updating the required C# language version to v7.3?

hi Sean. Can't see any reason not to do this, and think our build.cake and AppVeyor configuration will already handle it. If you want to prove it out before investing time actually introducing C# 7.3 features, maybe make a separate PR just switching to C# 7.3 first, and we can see if the appveyor config just handles it or needs any work?

Thanks again!

@SeanFarrow
Copy link
Contributor Author

SeanFarrow commented Jan 24, 2019 via email

@reisenberger
Copy link
Member

Closing due to no recent activity.

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

No branches or pull requests

3 participants