-
Notifications
You must be signed in to change notification settings - Fork 93
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
Drop the unnecessary indirection of mc::BufferStreamFactory
#3368
base: main
Are you sure you want to change the base?
Conversation
We only create a `mc::Stream` in like 1 place, the implementation of `BufferStreamFactory` is trivial, and I'm about to remove *all* the parameters from the `mc::Stream` constructor anyway. There's no need to keep this indirection (and the tests that check that we correctly call through that indirection)
12d0d62
to
7789335
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3368 +/- ##
==========================================
- Coverage 77.52% 77.48% -0.05%
==========================================
Files 1065 1061 -4
Lines 67869 67813 -56
==========================================
- Hits 52618 52544 -74
- Misses 15251 15269 +18 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A single question!
@@ -33,16 +32,6 @@ namespace mc = mir::compositor; | |||
namespace ms = mir::scene; | |||
namespace mg = mir::graphics; | |||
|
|||
std::shared_ptr<ms::BufferStreamFactory> | |||
mir::DefaultServerConfiguration::the_buffer_stream_factory() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to do anything in the symbols.map
file to remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Hurray for extra CI checks!
Eh, it still seems to want |
Huh. Thanks, symbol checks, for picking that up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against this, but with the_buffer_stream_factory()
we had a customisation point.
I have no recollection of why that existed (apparently it was part of a refactoring I did 11 years ago), but are we sure hypothetical downstreams (or ourselves) we don't need it?
I think it was a configuration point for testing purposes? Our |
We only create a
mc::Stream
in like 1 place, the implementation ofBufferStreamFactory
is trivial, and I'm about to remove all the parameters from themc::Stream
constructor anyway.There's no need to keep this indirection (and the tests that check that we correctly call through that indirection)