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
Automatically check that the version is correct when starting Toolpad?
Or have a script that check that the versions are correct, e.g. pnpm i https://pnpm.io/cli/install
These comments are only meant to instruct a vscode extension to do autocomplete. They're not meant as a versioning.
The current versioning philosophy was to be backwards compatible as long as the apiVersion property in the yaml matches. e.g. Toolpad should be able to run a project that was created in a lower version. However, this is probably not maintainable in the long run as there is no way of determining whether the file created comes from a newer or older Toolpad version.
We should likely do 1. as even when the schema doesn't change, Toolpad may behave differently across versions. a schema created with one version may not necessarily work as intended with a higher Toolpad version
I propose we move to the following versioning behavior:
Add the exact version of Toolpad that created/wrote the file in the yaml
On startup of app
if yaml version > toolpad version => show error and exit
if yaml version < toolpad version => if it's being run with the --migrate flag, migrate and run the app, otherwise show error and exit
On startup of editor
if yaml version > toolpad version => show error and exit
if yaml version < toolpad version => propose to migrate the project to latest version or instruct user to install lower version of Toolpad. Migrate the app if the user confirms. Do not run the editor until the versions match
Summary
When upgrading Toolpad, we usually update the YAML files.
which can be missed from the upgrade, e.g. with renovate: https://github.com/mui/mui-private/pull/473 + https://github.com/mui/mui-private/commit/a1a8c070347e14f9a0c999efd26a4e94aaea9c17
Should we:
Automatically check that the version is correct when starting Toolpad?
Or have a script that check that the versions are correct, e.g. pnpm i https://pnpm.io/cli/install
Do it like pnpm, only update the version if there was a migration, e.g. https://github.com/mui/mui-private/pull/473/files#diff-1033a05e142dd98448ec5e563e5cbf1a86563007ee9f36efb54481e0ec29e036R1?
Examples
No response
Motivation
No response
Search keywords: -
The text was updated successfully, but these errors were encountered: