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

spec versioning #20

Open
grahamgower opened this issue Dec 2, 2020 · 6 comments
Open

spec versioning #20

grahamgower opened this issue Dec 2, 2020 · 6 comments
Milestone

Comments

@grahamgower
Copy link
Member

The spec will probably want a version number/string. I'd imagine we might want to start somewhere close to 1.0?

@jeromekelleher
Copy link
Member

Agreed, we should start at 1.0 - we don't want to be changing much, and should be strictly semver about it.

@jeromekelleher
Copy link
Member

Should the version key be a required key, or can we default it to 1.0? I guess if we error on any unknown fields (#28), then it's safe to have it as 1.0 by default. It's only if the demography JSON contains stuff unknown to 1.0 that the version key will be required (which seems OK).

@grahamgower
Copy link
Member Author

Maybe we just need to reserve the keyword in the data model, and not provide a default at all? Implementations can ignore this field until there's a spec version > 1.0, it's just a clear signal to not use if for their extensions.

@jeromekelleher
Copy link
Member

Why not default it to 1.0? I think we need to be clear about our plans for extensions the spec.

@grahamgower
Copy link
Member Author

grahamgower commented Dec 7, 2020

Ok, lets talk this through... Say we start with a default of 1.0, and we later release v1.1 of the spec. Does this mean the default version gets bumped too? Say the new spec includes a new parameter x somewhere. It's optional to specify the x and it has default of 0. Does not specifying the version mean we get spec v1.1 behaviour (x=0), or spec v1.0 behaviour (x undefined)? Do all files hereafter need to specify the version to get spec > 1.0 behaviour?

@jeromekelleher
Copy link
Member

Do all files hereafter need to specify the version to get spec > 1.0 behaviour?

Yes, that would be my take. Version 1.0 is a fairly expressive minimum which we hope will be enough for the vast majority of use-cases. Therefore, making 1.0 the default gets rid of some annoying boilerplate. If someone wants to use features from 1.1 (which isn't supported in software using 1.0 parsers, by definition) then they need to specify schema_version=1.1 at the top.

Otherwise, I don't think we can avoid the problem of simulators silently dropping features from the model from newer schema versions.

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

2 participants