-
Notifications
You must be signed in to change notification settings - Fork 606
Public api cleanup round 2 #763
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
Public api cleanup round 2 #763
Conversation
There is also some code that is not used anywhere except in test, that after being internalized can probably be deleted right? Examples are |
Yes, that is likely true, but not what I was focused on for these PRs. Now that all that stuff is internal, it can be cleaned up later on without requiring a new major version! |
Great idea! Thanks for all your work. |
This reveals that ConsumerWorkService should not be public, but it's tricky to make that happen.
e56ec93
to
a801c45
Compare
@lukebakken I rebased this to resolve conflicts, so it should be ready to go again. It appears that the Travis build completed properly but didn't report progress back to the PR. |
Thanks @bording ! |
Proposed Changes
@lukebakken Here's my second pass at cleaning up the public API surface. With this PR, I think most/all of the low-hanging fruit is gone.
I do still think there's more of the API surface that should be looked at, but cleaning it up further will require some effort to untangle things, for example where there are public and internal concerns intermingled. There are certainly more interfaces than are likely needed. Seems like some actual design discussions will be needed to make more improvements here.
One thing specifically that's still bothering me is
ConsumerWorkService
. It's now the only public class in theRabbitMQ.Client.Impl
namespace. Its async equivalent,AsyncConsumerWorkService
, is already internal.I played around with making it internal as well, but the way things are currently structured, the public
IConnection
has aConsumerWorkService
property that is there solely to provide access to the work service to other implementation classes.Perhaps a separate PR just to make it clear what sort of changes would be required to fix it?
Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CONTRIBUTING.md
document