Skip to content

Fix environment iteration used by dmell export - #9

Merged
JohnAmadis merged 1 commit into
mainfrom
fix-export-env-iteration
Oct 13, 2026
Merged

JohnAmadis merged 1 commit into
mainfrom
fix-export-env-iteration

Conversation

@JaxCalder

Copy link
Copy Markdown
Contributor

Problem

dmell saves variables through Dmod_SetEnv, which dmenv implements using its current context. Bare export lists names through Dmod_GetNextEnvName, but dmenv did not implement that API. The fallback iterator reads the host environment (or returns no names on embedded targets), so exported variables are missing.

Change

Implement Dmod_GetNextEnvName in dmenv using the same current context as Dmod_GetEnv and Dmod_SetEnv. Include inherited variables and omit names shadowed by a child context. Add regression tests for the export path and inheritance.

Verification

ctest --test-dir /tmp/dmenv-export-build -R '^test_dmenv_unit$' --output-on-failure — 27 tests passed.

@JohnAmadis
JohnAmadis merged commit f2e8ed4 into main Oct 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants