{"record":{"id":"b8fa146659661561","repo":"BoundaryML/baml","slug":"test-selector-selector-uses-the-old-hierarchy-separator-use","errorCode":null,"errorMessage":"test selector `{selector}` uses the old `/` hierarchy separator; use `::` instead (for example `{}`)","messagePattern":"test selector `(.+?)` uses the old `/` hierarchy separator; use `::` instead \\(for example `(.+?)`\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_cli/src/test_command.rs","lineNumber":244,"sourceCode":"            || !self.profile_exclude.is_empty()\n            || !self.cli_include.is_empty()\n            || !self.cli_exclude.is_empty()\n    }\n}\n\nfn validate_selectors<'a>(selectors: impl Iterator<Item = &'a String>) -> Result<()> {\n    for selector in selectors {\n        let is_canonical_root =\n            selector == \"root\" || selector.starts_with(\"root.\") || selector.starts_with(\"root::\");\n        // Canonical ids may contain a literal `/` inside a user-provided test\n        // name. Only diagnose the recognizable legacy shape: an unrooted\n        // two-column selector whose test tail used `/` for further nesting.\n        if selector.contains('/')\n            && selector.contains(\"::\")\n            && !selector.contains('*')\n            && !is_canonical_root\n        {\n            anyhow::bail!(\n                \"test selector `{selector}` uses the old `/` hierarchy separator; use `::` instead (for example `{}`)\",\n                selector.replace('/', \"::\")\n            );\n        }\n    }\n    Ok(())\n}\n\n/// Bundle of the engine + tokio runtime + cancellation token shared by every\n/// test invocation. Kept as a struct rather than separate arguments so the\n/// helper functions don't trip `clippy::too_many_arguments`.\nstruct RunCtx<'a> {\n    engine: &'a Arc<BexEngine>,\n    rt: &'a tokio::runtime::Runtime,\n    cancel: &'a CancellationToken,\n    unhandled_spawn_failures: &'a AtomicUsize,\n    logs: TestLogLevel,\n}","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_cli/src/test_command.rs#L226-L262","documentation":"A test selector passed to `baml test` mixes `::` column separators with the legacy `/` hierarchy separator. The CLI only accepts `::` for hierarchy; `/` was the old separator. The check fires only for the recognizable legacy shape — an unrooted selector containing both `/` and `::`, no wildcard, and not a canonical `root...` selector (whose test names may legitimately contain a literal `/`).","triggerScenarios":"Passing a selector like `pkg::Column/SubTest` to `baml test` (or in profile include/exclude args) where the test-name tail uses `/` for nesting, the selector contains `::`, has no `*`, and doesn't start with `root.`/`root::`.","commonSituations":"Copy-pasting test IDs from older docs, scripts, or CI configs written before the `::` migration; hand-writing selectors from memory; migrated repos where include/exclude patterns in baml.toml profiles still use `/`.","solutions":["Replace every `/` with `::` in the selector — the error itself shows the corrected form.","Update include/exclude patterns in `[test.profiles]` in baml.toml to use `::`.","Update CI scripts and docs that pass legacy selectors to `baml test`.","If the `/` is part of a genuine root-rooted test name, root the selector with `root.`/`root::` so it is accepted."],"exampleFix":"// before\nbaml test \"my_pkg::Group/SubTest\"\n// after\nbaml test \"my_pkg::Group::SubTest\"","handlingStrategy":"validation","validationCode":"// shell: reject legacy '/' separators in test selectors before invoking\ncase \"$SELECTOR\" in\n  *\"/\"*) [[ \"$SELECTOR\" == root* ]] || { echo \"use :: not / in '$SELECTOR'\"; exit 1; } ;;\nesac","typeGuard":null,"tryCatchPattern":"baml test \"$SELECTOR\" || { echo \"try: ${SELECTOR//\\//::}\"; exit 1; }","preventionTips":["Grep baml.toml profiles and CI scripts for selectors containing '/' and migrate them to '::'.","Prefer copying selectors from current `baml test --list` output over old docs.","Note the exception: root-rooted selectors may contain '/' inside test names."],"tags":["cli","testing","selector","deprecated-syntax","baml"],"backgroundTag":"deprecated-api-usage","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}