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

Runtype compat version policy #58

Open
runeh opened this issue Apr 25, 2021 · 2 comments
Open

Runtype compat version policy #58

runeh opened this issue Apr 25, 2021 · 2 comments

Comments

@runeh
Copy link
Collaborator

runeh commented Apr 25, 2021

In newer runtypes we can use .optional instead of the union of record and nullable record that we currently use. There are also upcoming runtype features in new major versions we might want to use at some point.

What should the compat policy be? If we start using the latest and greatest, anyone generating code would also need to migrate their stuff.

  • Target newest runtypes lib
  • Target as old as possible that still supports the features we need
  • Configurable. Take an option and generate different outputs
  • Something else?
@simenandre
Copy link
Owner

Very interesting question. I think maybe it's best for us to generate as old as possible, but if there are things that are very useful, we can bump the runtypes version? Personally, I think maybe the .optional are one of those things that are useful. At least for readability?

On that note, we should probably explicitly require a version of runtypes? Maybe as a peer-dependency?

@haradzienski
Copy link
Contributor

I like @cobraz's point on keeping runtypes as a peer dependency.

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

No branches or pull requests

3 participants