Clarify OmegaConf literal escaping docs#1521
Open
timReynolds wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clarifies the OmegaConf inventory documentation around escaped interpolation syntax:
\${...}is deferred interpolation under the double-pass OmegaConf backend${escape:...}as the intended way to emit literal${...}strings in compiled output${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 --checkDocs-only change; no runtime tests were run.