Skip to content

Syntax of the include top-level metadata #534

@muzimuzhi

Description

@muzimuzhi

The include top-level metadata is documented on https://usage.jdx.dev/spec/reference/ as

include "./my_overrides.usage.kdl" // include another spec, will be merged and override existing values

but such use always results in a "missing file" error.

From implementation, include expects a file field, so one needs to use

include file="./my_overrides.usage.kdl"

usage/lib/src/spec/mod.rs

Lines 184 to 190 in ba1f57b

"include" => {
let file = node
.props()
.get("file")
.map(|v| v.ensure_string())
.transpose()?
.ok_or_else(|| ctx.build_err("missing file".into(), node.span()))?;

This inconsistency was introduced by the very first commit 927f3ae (init, 2024-01-18).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions