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

Refit and Polly #2562

Open
hansmbakker opened this issue Sep 6, 2022 · 7 comments
Open

Refit and Polly #2562

hansmbakker opened this issue Sep 6, 2022 · 7 comments
Labels
Status: Needs info Full requirements are not yet known, so implementation should not be started Type: Feature New feature or request

Comments

@hansmbakker
Copy link
Contributor

I see this library has its own request logic and serialization logic.

To make these library parts more maintainable, I would recommend using Refit, and adding Polly for dealing with the rate limiting part.

@nickfloyd nickfloyd added Type: Feature New feature or request Status: Needs info Full requirements are not yet known, so implementation should not be started and removed improvement labels Oct 27, 2022
@nickfloyd nickfloyd moved this to 🔥 Backlog in 🧰 Octokit Active Dec 5, 2022
@nickfloyd nickfloyd moved this from 🔥 Backlog to 🛑 Blocked/Awaiting Response in 🧰 Octokit Active Jan 13, 2023
@github-project-automation github-project-automation bot moved this from 🛑 Blocked/Awaiting Response to ✅ Done in 🧰 Octokit Active Oct 16, 2023
@nickfloyd nickfloyd reopened this Oct 16, 2023
@nickfloyd nickfloyd added hacktoberfest Issues for participation in Hacktoberfest and removed Status: Needs info Full requirements are not yet known, so implementation should not be started labels Oct 16, 2023
@nickfloyd nickfloyd moved this from ✅ Done to 🔥 Backlog in 🧰 Octokit Active Oct 16, 2023
@nickfloyd nickfloyd added the Status: Up for grabs Issues that are ready to be worked on by anyone label Oct 16, 2023
@martincostello
Copy link
Contributor

I would recommend against introducing Refit as a dependency.

As useful as it is, I've found through use in internal frameworks that the source generation it performs to create the interface implementations can cause issues when different versions of Refit are present in the complete dependency graph of an application.

For example when application A uses version Y of Refit and depends on library B which uses version X of Refit, there can be issues at runtime where implementation details of Refit embedded into B compiled against version X when the application runs using version Y.

This is easy-ish to manage internally as we can mandate updates to keep things in sync, but I think it would cause more trouble than it's worth for a public package in NuGet.org.

@hansmbakker
Copy link
Contributor Author

If asked today whether I use Refit myself today, I would explore alternatives first. Refit has had a period of being unmaintained without acknowledging it, where PRs and github issues were simply ignored and asking about it seemed frowned upon (see reactiveui/refit#1447). It seems to be revived now but personally I was surprised with how the project's status seemed a taboo topic.

However, I would still recommend using some form of code generation for a REST client instead of writing the request / retry / serialization logic myself.

@martincostello
Copy link
Contributor

Sure, I don't disagree that maybe using code generation is maybe better long term (the JavaScript Octokit API does this), I just think using Refit specifically to achieve that might solve problems for maintainers at the expense of rough edges for consumers.

These days I would have thought that a self-contained Roslyn source generator in this project itself would maybe be a better/more idiomatic way to go about it as it doesn't add new runtime dependencies for users of Octokit.

@nickfloyd nickfloyd added Status: Needs info Full requirements are not yet known, so implementation should not be started and removed Status: Up for grabs Issues that are ready to be worked on by anyone hacktoberfest Issues for participation in Hacktoberfest labels Oct 17, 2023
@nickfloyd
Copy link
Contributor

Hey y'all! Thank you for the footwork, thoughts, and clarity here. We still have not had a chance to take a closer look at Refit - so your insight here is 🥇.

I will say that my tendency is to keep things as simple as possible until they can't be. Meaning, I am generally less aggressive when it comes to introducing dependencies when the built in framework or language can meet the need. Not that there is not space for something like this but I'd rather there be a compelling case as to why we'd want to introduce a new dependency.

I removed the up for grabs and hacktoberfest labels because this really needs more discussion and concrete benefit evaluation.

Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Jul 14, 2024
@hansmbakker
Copy link
Contributor Author

Unstale

@github-actions github-actions bot removed the Status: Stale Used by stalebot to clean house label Jul 15, 2024
@andremantaswow
Copy link

Can the new solution support serializing all types of Octokit.Activity ? Issues like this #2337 have not been fixed yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs info Full requirements are not yet known, so implementation should not be started Type: Feature New feature or request
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

4 participants