Coder Social home page Coder Social logo

Comments (6)

jwhitlock avatar jwhitlock commented on April 29, 2024

I love the idea of versioning. This can be combined with documentation that refers to the version number that a feature was added or removed, and schema validators can change behavior based on the given version number.

I am having a hard time thinking of a "3rd digit" change, that wouldn't be equivalent to the commit number changing. Could you give some examples of changes that require version bumping?

from browser-compat-data.

SebastianZ avatar SebastianZ commented on April 29, 2024

from browser-compat-data.

Elchi3 avatar Elchi3 commented on April 29, 2024
  1. Would it make sense to provide a (versioned) API rather than having to maintain several versions of the data?

At the moment we are far away from bringing back the compat data API. In the future, we hope to have an API, but for the moment I propose to concentrate on the data itself. This might mean intermediate solutions, but I think we shouldn't block ourselves until we are again in a position where we can work on an API.

  1. I also think that two digits for the version number should probably be enough.

Likely.

Another idea to ensure our data is versioned, is to use git branches and/or git tags as opposed to putting version information into the data itself.

from browser-compat-data.

teoli2003 avatar teoli2003 commented on April 29, 2024

I am having a hard time thinking of a "3rd digit" change, that wouldn't be equivalent to the commit number changing. Could you give some examples of changes that require version bumping?

You are right, the classical SemVer doesn't work well with Schema. But there is this: http://snowplowanalytics.com/blog/2014/05/13/introducing-schemaver-for-semantic-versioning-of-schemas/

It defines SemVer for Schemas:
Given a version number MODEL-REVISION-ADDITION, increment the:

MODEL when you make a breaking schema change which will prevent interaction with any historical data
REVISION when you make a schema change which may prevent interaction with some historical data
ADDITION when you make a schema change that is compatible with all historical data

cc/ @JeremiePat as he have more experience than me on SemVer.

from browser-compat-data.

JeremiePat avatar JeremiePat commented on April 29, 2024

I have no strong opinion and I see proper use case for the third digit. In my opinion we can use SemVer quite straight forward:

  • 1st digit change: We introduced a breaking change
    meaning for a schema: Some old values no longer validate
  • 2nd digit change: We introduced some novelty that are backward compatible
    meaning for a schema: Old values still validate but some new values are now allowed
  • 3rd digit change: Bug fix that allows to still validate old values without introducing new ones.
    meaning for a schema: Some edge cased values that should have validate now properly validate (note: this could be considered 2nd digit change if the edge case isn't really at the edge); we've optimized our schema to make it simpler and/or faster and/or more readable without introducing new values nor breaking existing ones, etc.

By many aspects in the article suggested by @teoli2003 I don't really see the difference between MODEL and REVISION as in both cases it breaks compatibility with data. The trick with that is that many people do not expect a breaking change with a 2nd digit change which makes me skeptical about it.

from browser-compat-data.

Elchi3 avatar Elchi3 commented on April 29, 2024

I think after a few months of discussions we've decided in favor of this and added a version property to the new schema and to the data already. Please open new issues if there is new feedback.

from browser-compat-data.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.