-
Notifications
You must be signed in to change notification settings - Fork 316
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
Breaking change to listCse function in 0.130 #197
Comments
This library contains auto-generated clients which map directly to the Google APIs. That means you can always use the latest version of the clients in your code without waiting for someone to manually update the clients, but it also means it's hard to control for breaking changes. Outside of development, you should pin |
Yes in the technical sense that it is versioned pre-1.0, where breaking changes are allowed in minor versions. |
Excellent, thanks. That does seem to make the change in line with Semver as you said then. Would it be worth upping the version to v1 - as it does seem we've been on v0 for about 4 years now? Especially considering this library interfaces with live, stable, APIs - it's a bit misleading and doesn't infuse confidence or perceived reliability in the library? |
The advantage of pre-1.0 versions is that composer treats them like major versions. For instance, if you require Once a library reaches 1.0, composer starts assuming no breaking changes within major versions. That means that requiring In practice for this library, we'd need to bump the major version with every release, since they are generated automatically. Since we've already established the pattern of minor versions, there's no real need to change it. |
Thanks for the explanation. I've done some digging around as to why this ticket was raised. I think I've come up with why, but I'm not sure of the correct way to properly solve it. I understand this is long, but some guidance would be appreciated. It looks like the project that caused this issue to be raised didn't have It looks like This meant that the project automatically received the version in which the breaking change occurred even though the requirement for the PHP client was correct. I'm unsure if the project should be specifying both libraries or not? It could be argued that everything from the client services is considered the public API of the PHP client? I'm not entirely sure on the architecture of the API clients; so, does the PHP client require the client services in order to provide it as an API or does it have an actual dependency on the code? The reason for asking is that people could inadvertently be pulling in breaking changes if the code from If it's the latter, then the project definitely should have been manually specifying If it's the former, then the version of the client services and PHP client are directly linked. If there are breaking changes in the client services then this should be reflected in the major version of PHP client. Alternatively, the PHP client probably shouldn't include client services as a dependency to ensure that people pull in a version and are under the control of any potential breaking changes. As for the 0 major version in this repo, this part of semver.org concerns me:
Is this library considered stable? If my suspicions are correct, setting The FAQ section of semver.org is also interesting. I feel like this library hits most these points.
This is also interesting to consider:
I personally don't see an issue with making the major version I appreciate the versioning is kind of a tangent, so I'd be happy to open a new ticket about it if you'd like? |
Yes, that's the safest course. I opened googleapis/google-api-php-client#1823 to make this clearer in the documentation for the API client.
The former.
It does not prevent installation. It would prevent you from installing All your points are valid and are things we've been considering. The current situation is less than ideal and we're looking at ways we can practically improve it. The proper way to solve it is to think of this repository as a snapshot of the state of Google APIs at a given point in time. Freeze that snapshot at the point when you develop against it. Thanks for the research, you stated the issues very well. I opened #1823 to improve the documentation around this issue, and we'll keep working to improve the overall situation as well. |
In 0.130 the
listCse
function has been changed from:public function listCse($q, $optParams = array())
to:public function listCse($optParams = array())
so is a breaking change with only a minor version number changeThe text was updated successfully, but these errors were encountered: