Closed joshdifabio closed 7 years ago
We could also move async-interop/event-loop-implementation
into suggest
.
We could also move
async-interop/event-loop-implementation
into suggest.
We'd then have the issue of people having to specify dual requirements (api and implementation) in their libs.
I don't think people really need to specify the event-loop-implementation
requirement.
I don't think people really need to specify the
event-loop-implementation
requirement.
Personally, I agree. I think the implementation requirement will only be needed in certain packages. I think if we're all happy with that then it would make sense to move event-loop-implementation
to suggest
.
@bwoebi @trowski
will only be needed in certain packages
Which ones?
Which ones?
Ones like Guzzle which might use a loop but hide that fact from applications.
We don't care about such packages here. Every package that hides the loop isn't interoperable.
When I say hide the loop, I mean by implementing functionality which implicitly runs the loop and awaits promise resolution instead of requiring clients to bootstrap and run the loop themselves, such as how Guzzle does with its awaitable promises. This is useful in synchronous applications.
Anyway, I'm happy to make this a suggest if everyone else is.
@joshdifabio I know what you mean and IMO this is not implementable in a interop way, because it blocks then.
Moving event-loop-implementation
to suggest is an acceptable solution IMO. I would hope most people would quickly figure out their problem if the suggestion popped up.
Okay, I'm gonna move it to suggest.
I should squash commits before this gets merged.
@joshdifabio What's still missing is a note in the README about libraries only depending on event-loop-api
and only driver implementations depending on event-loop
directly.
What's still missing is a note in the README about libraries only depending on event-loop-api and only driver implementations depending on event-loop directly.
Right. Is someone working on a proper readme & metadoc?
@bwoebi Wanted to do that, don't know whether he started yet. But in the meantime, a note in the README is fine I guess.
I just noticed that the suggest
doesn't make any sense if packages only depend on the event-loop-api
, because event-loop
will only be pulled as dependency of the driver implementation.
While we might want to add a new method somewhere in the future, I think the proposed ways are too complicated and aren't worth the trouble, we should just increase the major version in case we need to add a method. I think it's unlikely to happen after 1.0 is out.
I think we should just go with #151 and then we don't need anything like this.
I think we should just go with #151 and then we don't need anything like this.
As long as we allow others to define their own drivers #151 doesn't actually change anything. We would still need to provide some kind of semantic version guarantee to both loop users and loop implementors. The question is still whether we would want to bump the major version for loop users when we change the driver in a way which only breaks implementations.
I don't think this PR represents any real complexity, but it gives loop users the power to opt-in to non-breaking API changes to the driver interface. I think that's worth the single provide
in composer.json
.
I don't think this PR represents any real complexity, but it gives loop users the power to opt-in to non-breaking API changes to the driver interface. I think that's worth the single provide in composer.json.
What's the proposal for libraries to depend on after #151 is merged?
What's the proposal for libraries to depend on after #151 is merged?
If I understand the question, I see three options:
I think 3 would be my preferred approach.
Closing, as project discontinued for now.
Resolves #129.
There's a potential issue here: Travis is now going to require a compatible
event-loop-implementation
in order to run the tests forevent-loop
. To solve this, perhaps we could create anevent-loop-dummy-implementation
repo inasync-interop
, not add it to Packagist so it's not pulled in elsewhere, movetests\DummyDriver.php
to that new repo, and add the following to theevent-loop
composer.json file:Thoughts?