Closed tavisrudd closed 10 years ago
Thanks @tavisrudd - will try and get this merged asap. I'm not sure about exposing Supervisor.Types
as a public top level module though. Is there really a need for third parties to know about all those Req and Respone types? As an alternative, if we do wish to just export everything and let people figure things out themselves, we could rename it to Supervisor.Internal.Types
, but I feel that is of dubious merit if some of the types are meant to be public but some are not. We don't want people importing things from an Internal namespace that they need to use to get on with their day jobs! Of course, they can import the proper public types from Supervisor
itself, but then it seems confusing to get both public and private types from something Internal. This was why on that other ticket, I suggested that the idea of just exporting everything inside an "Internal" namespace is not as simple as it necessarily sounds.
Splitting Supervisor.Types
up into two bits, public vs private, seems unnecessarily complicated though - I'd recommend keeping the private things private. I don't see how any kind of extension points could be utilised by someone having access to supervisor's internal types here, so I think it's better to just keep private things hidden altogether in this case.
Thoughts?
I agree. I only added it to the exports as an afterthought when one of the tests failed because of it not being exported. I'll look into that failing test and remove it from the exposed modules.
Btw, this new module only exports the types that were previously public in Supervisor
. I left the Request
types private in Supervisor
for now but did consider adding an additional Internal.Types
. Only the public Result
types are in here.
@hyperthunk it's on other-modules
now, where I should have stuck it in the first place, but see my note above re it only containing public types.
Cool thanks @tavisrudd - I'll planning to go through outstanding PRs this weekend.
This is in preparation for some changes to the handling of the StarterProcess variants of ToChildStart. See discussion on PR #77.