You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am trying to figure out how to properly version my server API, so that my app refuses to connect to the server if the app version is to old to work with the server API.
Describe the solution you'd like
I would like serverpod generate to alert the user when the generated code breaks the API in a non-backwards-compatible way (removing a method or parameter, adding a required parameter, or changing the type of a parameter). (Changes that do not break backwards compatibility include things like adding a method or optional named parameter.)
Then, if serverpod generate indicates that the server API has changed, the user can opt to update the server API version number using another serverpod_cli command (this should probably be done manually so that experimental or accidental changes to the API don't bump the API level).
Then on the client, initializing the SessionManager, an error will result if the client tries to connect to a server with an incompatible API.
Describe alternatives you've considered
I can version the API manually, and have the client ask the server for its API level, before deciding whether to allow the user to use the app or not. However, this would be prone to breakage.
Activity
SandPod commentedon Mar 26, 2024
More thoughts on the topic: #2052