Version duql syntax as MAJOR.MINOR
Context#
Versioning the duql query language in dftracer-utils.
Decision#
Store the duql language version as duql: 0.1 in the top-level VERSION file. Generate DFTRACER_UTILS_DUQL_VERSION_MAJOR and _MINOR. The query pragma accepts duql 0 and duql 0.1. A query's major must match the engine's major, and its minor must not exceed the engine's. A query declaring duql 0.2 on a 0.1 engine gets a clear "needs 0.2" error. There is no patch number.
When changing pragma syntax, update scripts/duql.lark, the grammar samples, reference/duql.rst, and the Python builder together. Replace old duql 1 pragmas in tests, samples, and docs when the engine starts at 0.1.
Why#
A new function or stage is a minor language change. A patch-level language version has no meaning: a language fix with no language change belongs to the engine, and no query can depend on a patch. The minor carries meaning from the first day.
Rejected options#
A single integer duql: 1.
Evidence#
The user chose 0.1 as the starting value. The source note says the engine checks the query major for equality and the minor for compatibility.
Also found by searching
- how does the duql pragma version work
- query requires duql 0.2 but engine supports 0.1
- should a language version include patch numbers
- update duql grammar samples when changing pragma syntax