-
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
Version flag for profiles #3384
Comments
Interesting. For a start can't we simply expose the OSRM version we set in CMake to Lua and also set a required version in the Lua profiles? Then the profiles could check their version against the OSRM version currently running. This would catch profile mismatches and would even allow the profiles to specify required version bounds. Think of profiles specifying |
Hrm you think that will be less error prone then doing another sequential version like we do for the HTTP API? I was thinking about something like: properties.version = 1 -- (default value for everything below 5.5) When we load the scripting context we use that version number to load the appropriate bindings. The default value makes sure that at least every current profile in existence will be backward compatible and needs to be upgrade explicitly once we change the profile API. We could throw a deprecation warning if your profile does not expose the current version, but still support older versions. |
For the record we settled on a global |
This landed with #3487. |
Currently when we want to make changes to the profiles that are not backward compatible we would do a major version bump of
osrm-backend
.However that also means that profiles that were not ported properly will fail (maybe even silently) if they are not adjusted to API changes.
To make this explicit and open up the possibility for supporting multiple profile API version we should add a version flag to
ProfileProperties
so we could load the appropriate version of the scripting context.The text was updated successfully, but these errors were encountered: