cps icon indicating copy to clipboard operation
cps copied to clipboard

schema itself should be versioned using semantic versioning

Open dcbaker opened this issue 4 years ago • 7 comments

The schema itself should be versioned, and have a required "schema-version" field. It should use semantic versioning, so that a parser implementing 1.1 can parser 1.0 as valid schema, but 2.0 could look completely different.

dcbaker avatar Nov 18 '20 19:11 dcbaker

The way we codified this in other documents in similar fields is to have minor bumps for additional (but non-essential) information, but semantic changes such as additional, non-ignorable information be a major bump. Note that tools writing them should support explicitly creating older versions (assuming they are sufficient for the use case) to increase compatibility overlaps.

mathstuf avatar Nov 18 '20 19:11 mathstuf

That sounds like semantic versioning, 1.1 is a strict superset of 1.0, and 1.2 is a strict superset of 1.1, so a 1.0 document is a valid 1.2 document (or 1.1000000000), but not vice versa. And 2.0 can be completely 100% different (or only 99% different, but a 1.x document is not a valid 2.x document)

dcbaker avatar Nov 18 '20 19:11 dcbaker

Yes, but the key is to define what "incompatibility" means. Adding a key is technically a minor bump, but adding an unignorable key is a major bump. Surface-level analysis is unlikely to get these things right often enough to be useful :/ .

mathstuf avatar Nov 18 '20 19:11 mathstuf

"don't let perfect be the enemy of better?" :)

I would assume though that after a while version bumps would become pretty rare (obviously like anything new we're likely to find a lot of bugs/deficiencies early on) but that's also why semver specifically says < 1.0 is the wild west, do whatever. Presumably we could wait to hit 1.0 until development had slowed down we were fairly certain we weren't going to need to make sweeping changes.

dcbaker avatar Nov 18 '20 19:11 dcbaker

I think once we have CPS working for projects of sufficient complexity, the majority of cases are likely handled. A corpus of such projects off the top of my head:

  • VTK (complicated usage requirements)
  • HDF5 (build options that consumers care about that affect ABI)
  • MPI (everyone's favorite)
  • Boost (intricate dependencies)
  • Qt (moc, plugins, and such)
  • glib stuff (GObject sidecar info)

mathstuf avatar Nov 18 '20 20:11 mathstuf

Is there anything to be done here except making Cps-Version required?

mwoehlke avatar Sep 01 '23 17:09 mwoehlke

Is there anything to be done here except making cps_version required?

Last call. Unless someone has something to add, I'm going to declare this "completed". (The next time I look at it, which may or may not be "soon". :slightly_smiling_face:)

mwoehlke avatar Mar 27 '24 22:03 mwoehlke