-
Notifications
You must be signed in to change notification settings - Fork 9
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
Define versioning strategy #129
Comments
Just be sure I'm understanding this approach, the following lines in a project's composer.json "require": {
"async-interop/event-loop": "^0.4",
"async-interop/event-loop-implementation": "^0.4"
} would become "require": {
"async-interop/event-loop-api": "^0.4",
"async-interop/event-loop-implementation": "^0.4"
} with loop implementations being the only libs to require If that's correct, I like it. |
@trowski That's how I'd see it, yes. Regarding packages which require |
@joshdifabio I see it the other way round. |
I thought about people wrongly depending on Would you mind providing a PR? |
Yeah, that's why I thought the safest thing would be for
Will do. |
If we expect libs to always require both Edit: We could even add something like |
@joshdifabio What does that conflict thing really add? How does it guarantee that? |
@kelunik is there value in making the two separate? What would the version number of
Imagine
Now, if a loop implementation used the wrong API version, for example:
Composer would prevent this buggy loop implementation from being used because of the conflict clause in |
Anyway, I don't think the conflict clause is that important; the important question to me is whether we want to force people to always require two packages instead of one and what the version of In my experience, if doing one thing implicitly means doing another, the two should be grouped together. |
Even if they mean different things, I think we can kill |
All libraries what depend on directly is actually the API. The API depends on an implementation being provided. In case you access e.g. the Driver interface directly, then you should specify implementation too. (to restrict what the API depends on.) But most libraries don't.
And for the loop impl:
and for libraries:
(and applications similar to libraries, just they require a concrete implementation too. |
@bwoebi The |
I think I like Bob's suggestion, even if the circular dependencies feel a bit dirty.
I think the loop implementations need to provide something in order to be searchable on Packagist, so |
@kelunik The event-loop requires an implementation when being used.
The fact is that there is a circular dependency. The implementation depends on the driver and the loop standard needs a Driver to work. [To make it more cleanly we could split driver and impl, but I do not see much point in that except a little purism.] |
I thought about that, too. Makes PRs harder though, but there shouldn't anyway be many changes after the final version is released.
It's enough for packages to have After thinking about it, I think I prefer separate packages, makes it all cleaner and avoids confusing virtual packages. |
Interesting. So we'd have something like this?
Is that what you mean? Seems good to me! |
Basically this, just without ripping this repo apart. |
@bwoebi Without ripping this repo apart, we end up with having third party packages require |
Splitting it is stupid, as |
|
Good point. I'll make a PR this evening unless someone else does it first. |
@joshdifabio Ping, you wanted to provide a PR. |
Apologies, this slipped my mind. I'll provide a PR this afternoon. |
Do we intend to use semantic versioning for these standards? I assume that we do and that the semver guarantees will apply to both the service provider interface (SPI) and the client API, as is standard within the PHP ecosystem. If that is the case, I think we should consider also maintaining a semantic version number for only the client API. Perhaps this could be done within composer.json:
Client packages could then require async-interop/event-loop-api while loop implementations would require async-interop/event-loop.
This would allow us to make breaking changes to the SPI, for example adding a method to
Driver
, without breaking all the client packages of event-loop.The text was updated successfully, but these errors were encountered: