Skip to content

Clarify OmegaConf literal escaping docs#1521

Open
timReynolds wants to merge 1 commit into
kapicorp:masterfrom
timReynolds:codex/document-omegaconf-escape-literals
Open

Clarify OmegaConf literal escaping docs#1521
timReynolds wants to merge 1 commit into
kapicorp:masterfrom
timReynolds:codex/document-omegaconf-escape-literals

Conversation

@timReynolds

Copy link
Copy Markdown

Summary

Clarifies the OmegaConf inventory documentation around escaped interpolation syntax:

  • documents that \${...} is deferred interpolation under the double-pass OmegaConf backend
  • documents ${escape:...} as the intended way to emit literal ${...} strings in compiled output
  • adds examples for Terraform references, shell variables, and quoted complex expressions
  • updates the migration table from the stale ${tag:...} guidance to ${escape:...}

Rationale

Based on the upstream 0.35 changes, this appears to be intentional behavior rather than a runtime regression to patch in the loader. PR #1371 introduced the double-pass resolution flow where \${...} is unescaped after the first pass and resolved in the second pass. PR #1445 then repurposed ${escape:...} to emit literal ${...} output protected from both resolution passes.

This PR therefore updates the documentation to match the current behavior instead of changing OmegaConfInventory.load_file() or altering resolution semantics.

Validation

  • git diff --check

Docs-only change; no runtime tests were run.

@github-actions github-actions Bot added documentation Anything related to documentation size/s labels Jun 8, 2026
@timReynolds timReynolds marked this pull request as ready for review June 8, 2026 21:41
Copilot AI review requested due to automatic review settings June 8, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the OmegaConf inventory backend documentation to clarify how escaping works with the double-pass resolution, and introduces the recommended ${escape:...} pattern for emitting literal ${...} strings in compiled output.

Changes:

  • Documented that \${...} is unescaped after the first pass and then resolved in the second pass (not preserved literally).
  • Added a new section with examples for producing literal ${...} output via ${escape:...}.
  • Updated the migration guidance to prefer ${escape:...} for literal output and clarified when \${...} remains appropriate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


This enables **deferred evaluation** - interpolations that resolve based on their final context after merging.

Escaped `\${...}` values are not treated as literal output in this backend. They are unescaped after the first pass and resolved in the second pass. To emit a literal `${...}` string in compiled output, use the `${escape:...}` resolver.
@timReynolds timReynolds changed the title [codex] Clarify OmegaConf literal escaping docs Clarify OmegaConf literal escaping docs Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Anything related to documentation size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants