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

Refactor coroutine feign #1754

Closed

Conversation

wplong11
Copy link
Collaborator

@wplong11 wplong11 commented Sep 18, 2022

If you want to see the final result, see PR #1757

Eliminates the possibility of breaking changes following AsyncFeign's refactoring in advance

TODO

  • Modify CoroutineFeign.CoroutineBuilder to extend Feign.Builder
    • It is intended to be used when customizing Feign.Builder in Spring Cloud OpenFeign.
    • I think it's okay to work after merged, because CoroutineFeign is an experimental feature right now.

@wplong11 wplong11 mentioned this pull request Sep 18, 2022
1 task
Copy link
Member

@velo velo left a comment

Choose a reason for hiding this comment

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

Outstanding job.

Just a small change to add methodInfoResolver attribute to Corotine builder. Same as AsyncFeign builder

.responseInterceptor(responseInterceptor)
.invocationHandlerFactory(invocationHandlerFactory)
.defaultContextSupplier((AsyncContextSupplier<Object>) defaultContextSupplier)
.methodInfoResolver(KotlinMethodInfo::createInstance)
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be extracted to an attribute on the builder and let people override if needed?

Also, that is necessary to allow coroutine methodInfoResolver to be enriched

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean to allow the CoroutineBuilder to set the methodInfoResolver, and also provide an option to enrich the methodInfoResolver using Capability?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I created a new PR #1762

Copy link
Member

Choose a reason for hiding this comment

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

Yes! Perfect

@wplong11 wplong11 marked this pull request as draft September 20, 2022 00:33
@wplong11
Copy link
Collaborator Author

wplong11 commented Sep 20, 2022

This PR will be closed, as PR #1755 containing this PR is merged. The feedback will be worked as a separate PR after discussion.

wplong11 added a commit to wplong11/feign that referenced this pull request Sep 20, 2022
@wplong11 wplong11 closed this Sep 20, 2022
velo pushed a commit that referenced this pull request Sep 20, 2022
* Add methodInfoResolver attribute to Coroutinebuilder

Work on the [feedback](#1754 (comment)) of PR #1754
@wplong11 wplong11 deleted the 1-refactor-coroutine-feign branch October 9, 2022 17:50
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.

None yet

2 participants