Compatible Since

Compatible Since: The compatible_since metadata field which indicates the earliest version of the dmd tooling that can be used with the resulting database.

To provide an easier means to determine whether the version of the dmd tooling you're using will be compatible with the version of the SQLite database you've built, the compatible_since in the metadata table can provide you the earliest version of the dmd CLI that will be compatible.

This is new as of v0.91.0, where dmd db init will produce the compatible_since field in the metadata table.

The important thing to note is that the compatible_since is the earliest version of dmd/dmd-web/dmd-graph that can be used with the given database.

For instance, using the following pseudocode we can show how the versions could be compared:

compatible_since = 'v0.91.0'
tool_version     = 'v0.99.0'
is_compatible    = compatible_since <= tool_version

Examples

To make it easier to understand how this can be used, you can see the below examples:

compatible_since dmd/dmd-web/
dmd-graph version
used
Compatible? Commentary
v0.91.0 v0.91.0
v0.92.3 v0.91.0 This may be due to a
bug that's been fixed that
you may be rely upon the behaviour of
v0.99.0 v0.91.0 This may be that a breaking
change has been made to the
table schema
v0.91.0 v0.99.0

What constitutes incompatibility?

Note: Although bug fixes will aim to also include a bump of the compatible_since, the priority will be making it clear when there are breaking changes introduced.

Consuming the data programatically

The dependency-management-data codebase produces a helper method, IsCompatible, in the metadata package, which can be used to determine whether a given tool version is compatible.

The logic relies upon the hashicorp/go-version library, but currently performs a fairly straightforward comparison, as shown by the following pseudocode:

compatible_since = 'v0.91.0'
tool_version     = 'v0.99.0'
is_compatible    = compatible_since <= tool_version

Within the dependency-management-data codebase, there is also a constant variable, CompatibleSince that can be used to track the compatible_since for that version of the codebase.