Release history of the DML interpreter and of the dml-go library, newest release first. Dates are the dates of the tagged commits.
DML
The language, the interpreter and the dml command line tool.
0.9.0
DML programs can read data from configuration files: loadEnv(".env") loads a .env file from the project directory, and env("KEY") or env("KEY", "default") reads its values. Environment variables of the process are not exposed to DML programs.
DML files can keep development and production values side by side in top-level mode dev { ... } and mode prod { ... } blocks. The mode is selected with --mode NAME (or -m NAME) when running a file, and without the flag every mode block is skipped. mode is now a reserved word and can no longer be used as a variable, class or instance name.
Contributor instructions now require updating the documentation and the patch notes with every user-visible change.
0.8.2
The release pipeline checks the SHA-256 of the published DML-all.jar before it updates the Homebrew formula.
The Gradle wrapper distribution is checksum-pinned and Gradle dependency verification metadata was added.
The README now explains how to verify a downloaded jar with shasum -a 256, and the global wrapper script uses exec with an explicit JDK 17.
Added contributor instructions for editing the repository.
0.8.1
Files larger than 10 MiB are rejected with a clear error: .dml files, imported files and JSON, YAML, XML and plist inputs.
Added a Gradle wrapper pinned to 8.5, so builds no longer depend on the Gradle installed on the machine.
dml --update now stops with an error message when one of the Homebrew steps fails.
dml --version reports the correct version (it printed 0.6.2 before).
0.8.0
Tagged on the same commit as 0.7.1, so the changes are the ones listed under 0.7.1.
0.7.1
Regex validation is protected against ReDoS: patterns are limited to 500 characters, inputs to 10,000 characters, and a match is cancelled after one second.
Function calls are limited to a depth of 500, so infinite recursion ends with an error instead of a crash.
JSON, XML and plist inputs, and maps flattened for conversion, are limited to a nesting depth of 100.
Declared types are enforced: assigning a value of the wrong type to number, string, boolean, list, map or char fails with a message naming the variable and its declared type.
JSON and YAML output escapes quotes, backslashes and control characters in keys and values.
0.7.0
YAML is parsed with a safe constructor, which removes unsafe deserialization.
XML and plist parsing rejects DOCTYPE declarations and external entities (XXE).
Imports are resolved to canonical paths and blocked when they leave the directory of the main file (path traversal).
Fixed converting DML to XML when values contain special characters.
Added the first JUnit security tests for imports and the interpreter.
0.6.2
Release pipeline update only; the interpreter is unchanged from 0.6.0.
0.6.1
New timezone declarations, validated against the Java time zone database (for example timezone zone = "Europe/Warsaw";).
New duration declarations written as HH:MM:SS.
Strings can be written with single quotes as well as double quotes.
0.6.0
import "file.dml"; pulls another DML file into the current one.
User-defined functions with function name(a, b) { ... }, return, print(...) and function call statements.
var declarations, and declarations without an initial value (string name;).
Regex validation with regex pattern = "..."; and validate value matches pattern;.
0.5.1
New assert statement that fails with the asserted expression when it is false.
Comparison operators >, <, >= and <=, with errors for incompatible types.
0.5.0
Classes (class, instances and object.field = value assignment) and enum declarations.
The private modifier for variables.
New types url, file and char, each with validation.
Plist and properties files can be converted to DML (-r plist, -r properties).
New commands: dml -v for the version, dml -u to update via Homebrew and dml -n FILE to create a file from a template.
The project is licensed under Apache 2.0.
0.4.2
New types date, datetime and time, with format validation.
New now() function with offsets, for example now("+1d") or now("-2h").
Decimal numbers such as 1.0 are supported, and numeric strings are parsed into numbers.
0.4.0
JSON and YAML files can be converted to DML.
DML can be written as XML, properties and plist files.
Comments (// and /* */) and escaped characters inside strings are supported by the grammar.
New repl command to run code from the terminal.
0.3.0
dml write yaml FILE converts DML to YAML.
dml lint FILE checks whether a file is valid.
dml format FILE reformats a file.
0.2.1
dml write json FILE converts DML to JSON.
0.2.0
First command line interface: dml read FILE and dml help.
Installation through a Homebrew tap, which downloads the jar from GitHub Releases.
The README documents installation, an example and the available commands.
0.1.0
First release: an ANTLR grammar and interpreter for typed variable declarations (string, number, boolean, list, map).
List and map literals, + expressions and nested property access such as user.name.
dml-go
The Go library and command line tool for loading, validating and caching .dml configuration files.
0.10.0
Struct validation through a validate tag with the rules required, min, max, len, oneof and dive. It runs inside Unmarshal, UnmarshalFile and Decode.
Validation reports every violation at once in a ValidationError made of FieldError values with rooted field paths, and the messages never contain the rejected values.
WatchOptions gets a Validate function. A reload that fails validation is rejected and the last valid config stays active.
0.9.2
Live reload with Watch(path, WatchOptions): a polling watcher with Interval, MaxFileSize, OnReload and OnError that swaps in a freshly parsed config and can be stopped with Stop().
Environment variables accept defaults: ${VAR:-default}. The CLI gains -env, -env-prefix and repeatable -set key=value flags.
Layered configuration: LoadFiles reads several files in order, Merge merges nested maps and replaces lists, and SetFromString overrides a single key.
Typed unmarshaling with generics: Unmarshal[T], UnmarshalFile[T] and Decode[T], driven by dml struct tags.
0.8.0
NewConfig and SaveToFile reject paths that escape the working directory and return ErrInvalidPath.
Saved files are created readable by their owner only, and the permissions of existing files are tightened when they are saved or when defaults are applied.
The DML jar download is pinned to the TLS keys of the download hosts in addition to its SHA-256, and redirects must stay on HTTPS.
The bundled DML jar was updated to DML 0.8.1.
0.7.1
Map style control: SetMapStyle globally or per Config, and a directive inside the DML file.
Default policies for ApplyDefaults: DefaultPolicyPermissive, DefaultPolicyStrict and DefaultPolicyConservative.
Partial reload with ReloadKeys, available on Config and as a package-level function.
SaveToFile, ToJSON and FromJSON on Config, and an improved Dump.
Fixed: values from .env files are no longer exported into the process environment.
Breaking: SetDefaultsToFile is replaced by ApplyDefaults, and Clone, Delete, MissedKeys, MissedTypedKeys, ValidateState, MustInt, MustFloat, MustBool and SetMetaDefaults are no longer part of this release. Merge returns in 0.9.2.
0.7.0
Environment support: LoadEnv, LoadEnvIfExists, ExpandEnv for ${VAR}, GetEnv, MustGetEnv, LoadWithEnv, SetEnvDefaults and EnvOverride.
Structured errors with DMLError and ErrorType, and Lint(path), which returns LintIssue values.
More Config methods: New, GetInt, GetFloat, MustInt, MustFloat, MustBool, Set, Delete, Merge and Clone.
SetDefaultsToFile takes a forceOverride argument.
The dml command now takes the file directly (dml config.dml) and prints the config dump.
Breaking: the package-level Parse and ParseInto and the callback-based Watch(file, onChange) were removed. Load files with NewConfig or Load.
The bundled DML jar was updated.
0.6.1
Applying defaults creates the config file when it does not exist yet.
The keys that came from defaults are tracked with SetMetaDefaults, and the file is written in DML format.
0.6.0
Dump renders the config as DML source with typed declarations (map, string, number, boolean, list) instead of JSON.
0.5.0
SetDefaultsToFile fills in the keys that are missing from a config file.
The bundled DML jar was updated.
0.4.0
MissedKeys, MissedTypedKeys and ValidateState, which returns a ValidationResult.
Watch(file, onChange) calls a function when the config file changes.
0.3.0
The Config type with NewConfig, GetString, GetNumber, GetBool, GetList, GetMap, MustString, Has, Keys and Dump.
Validation with ValidateRequired and ValidateRequiredTyped.
ParseInto, the cache helpers Cache, Reload and ClearCache, and the generic Load[T].
The README documents the API.
0.2.0
Parsing and validation happen in Go without creating an intermediate JSON file.
0.1.0
First release: dml.Parse and the dml read FILE command, which prints the parsed result.
The DML jar is downloaded automatically and verified against a SHA-256 checksum before it is used.