Comment 5 for bug 1790842

Revision history for this message
Simon Richter (sjr) wrote :

@Wayne, that has all the information, but using that from a script would require parsing the string, which may contain an arbitrary number of dashes in the base tag name and then splits off the number of commits and the git commit ID with more dashes, so I'd think this would be too difficult to use reliably.

The entire point of making this the first official API is that it allows us to say "any version from X onward has this other API", or "we sadly had to rename this API in version Y". The main requirement for the version API is that it will have to remain stable and easy to use in order to be useful.

Maybe the most useful for now would be the nightly commit counter, because that allows simple numerical comparison:

    ver = GetNumericalVersion();

    assert (ver >= 12345), "KiCad version too old"

    Select Case ver
        Case 12345 <= ver < 23456: route_track(...)
        Case 23456 <= ver < 34567: route_trace(...) # API got renamed
    End Select