-
Notifications
You must be signed in to change notification settings - Fork 325
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
Fix ToSchema Version
instance.
#2978
Conversation
This partially reverts commit 6f91151.
constructed = | ||
-- (fromEnum doesn't work as soon as we drop support for V0.) | ||
(\v -> (read . Imports.tail . show $ v, v)) <$> [minBound @Version ..] | ||
explicit = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like how easy it is to forget or make a mistake about this, but I don't have a better idea in mind at the moment. 😰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean? how would you do a mistake here that'd go uncaught by the CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean forgetting to add / update versions and it not being caught by GHC/ type checking. But hopefully CI is enough to prevent us from messing up 🤞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just revert and use an explicit list of versions? This is a mess.
my idea was that this way, you get an error in the integration tests if you forget to update but i'll let you decide: please approve or reject. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you forget to add a new version that has some changes, you'll get an error in the tests anyway as soon as you make use of the new stuff. On that basis, I'm for restoring the simple code.
This partially reverts commit 6f91151 (#2965).
I think I've overkilled it, but I wanted it to be safe!
Checklist
changelog.d