adobe / adobe/himl

Nested interpolation lost when mixed inside string context

Open
#177 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
135
Forks
34
PR merge metrics
No merged PRs in 30d

Description

**Summary**
When using Himl’s (`himl==0.15.2` from pip) nested interpolation (`{{foo.bar}}`) inside a longer string, the interpolation silences the surrounding text and resolves only to the raw value. But when using the same interpolation alone, it works correctly.

---

#### Steps to reproduce

1. **Create `foo.yaml`:**

```yaml
foo:
bar: 42
```

2. **Create `baz.yaml`:**

```yaml
resources:
test:
type: example:Test
properties:
path: "hello {{foo.bar}} world"
```

3. Run:

```bash
himl-config-merger foo.yaml baz.yaml > merged.yaml
```

4. **Expected in `merged.yaml`:**

```yaml
resources:
test:
properties:
path: "hello 42 world"
```

5. **Actual result:**

```yaml
resources:
test:
properties:
path: 42
```

— The string collapses to just `42`.

6. **Alternative case that *does* work:**

```yaml
path: "{{foo.bar}}"
```

→ Correctly interpolates to:

```yaml
path: 42
```

Any help would be much appreciated!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing this with foo.yaml and baz.yaml through the himl-config-merger command, then locate the interpolation handling used for a nested value inside a longer string. Verify that the merged output preserves “hello ” and “ world” around 42 while the standalone {{foo.bar}} case remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.