Skip to content
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

Enable making breaking changes in the future #833

Open
iFreilicht opened this issue Oct 14, 2024 · 0 comments
Open

Enable making breaking changes in the future #833

iFreilicht opened this issue Oct 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@iFreilicht
Copy link
Contributor

As suggested in #310 (comment), it would be great if we could communicate breaking changes to users in a safe way.

My idea for implementing this would be as follows:

  1. Add a disko.stateVersion option, together with a warning that the user should set it, and that not having it set will become an error in the next major version
  2. Add an assertion that will make sure that the internal disko.__currentVersion option has the same major version as disko.stateVersion. If it isn't, just print an error that explains what to set disko.stateVersion to.
  3. Add this option to all documentation as well
  4. Update the release script to update the versions in the documentation on every release
  5. Set the list of allowed versions to [ "1.9" ]
  6. Release the next minor version (v1.9.0)

This will introduce the option without disrupting anything, and will give users time to add the new option to their configuration.

We can still add new options in a backwards-compatible way during minor releases by using config.warnings or mkRenamedOptionModule.

Now, when we want to release breaking changes, we only need to change disko.__currentVersion and modify the error message. We can either link to an upgrade guide or explain which changes need to be made directly in the error, depending on the complexity.

At this point, evaluating a disko config with an incompatible version of disko will always fail, which is the safest thing to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant