-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
libosrm breaking change in master after v5.22.0 #5741
Comments
Yes, it is caused by providing more effective serialization with osrm. in your case you can continue using json by doing something like:
|
Thanks @akashihi for your feedback on this. I'm not questioning the internal changes and motivation here, my point is that having a breaking API change is a problem as such. OSRM explicitly uses semantic versioning. It's advertised in CONTRIBUTING.md and it has always been a key consideration for the core team not to break the API in the past few years. Thus all downstream Are there maybe ways to circumvent the problem, i.e. provide those serialization changes by extending the API in a retro-compatible way? |
As it was mentioned earlier [https://github.com//issues/5548#issuecomment-531247180]" projects that are afraid to change something in their API's, usually lose their relevance and disappear." This API change is more extension than really a break and it is not yet officially released, so not semver rules are broken yet. I agree that such a big change deserves to be released under 6.x version :) |
This is not about being "afraid to change something" in the API, but rather about how the changes are handled. One may argue that projects that break their API lose the trust of users. ;-)
I don't see it this way because previously working code that uses
Totally, the point of this issue is to raise awareness on a potential breaking change for future releases. |
Right! What i meant - the old API is hidden below the new API, thus pretty trivial change is required, not the whole rewrite of the client code from scratch. And even more - introducing that ResultT wrapper will allow future API extensions without breaking it again.
I completely agree with you. When (if?) a next release will be made, that breaking API change needs to be stated loudly. |
It would be useful to have the views of some of the (remaining) core devs here. Similarly to other issues suffering from #5209, the problem is that now that Mapbox has dropped its efforts into OSRM, a clear road-map and decision process for this kind of change is missing. |
I generally agree that this is a change that breaks the API sufficiently to indicate a major version bump - old code should always recompile without change against The right way to implement the FlatBuffer interface and maintain compatibility would be to move detection of whether the user requested JSON or FlatBuffeer format up into the HTTP layer, then provide a new overload of the various methods that took a different return parameter type. The big hint in the PR that a major API change was made was that The HTTP interface changes made in If someone has time, it's should be possible to unbreak the C++ interface and still support the new feature - a few things need to be moved around. |
As original author of FlatBuffer interface i can do that unbreak, but could you please provide more information, on how do you think it needs to be done? PS @danpat Could you please take a look at my other PRs? :) |
Hi there. I'm using
libosrm
with a simple consumer code that comes down to something like:This works perfectly against tagged versions of OSRM up to
v5.22.0
, but fails when buildinglibosrm
from currentmaster
with something like:Indeed, the
Table
interface has been changed in this commit.I didn't dig enough to know whether switching from
osrm::json::Object
toosrm::engine::api::ResultT
would be straithforward, but this looks like a breaking change anyway. All builds relying on previouslibosrm
interface will fail in the same way if this change makes it into a release.FWIW, original problem spotted at VROOM-Project/vroom#344.
The text was updated successfully, but these errors were encountered: