Repository navigation
Conversation
Replace `src/settings.js` and `src/settings_internal.js` with `src/settings.toml` and `src/settings_internal.toml` as the canonical source of truth for compiler setting defaults and documentation. Add `tools/maint/gen_settings.py` (replacing `tools/maint/update_settings_docs.py` in CI's `--check` step) to validate the TOML files and generate checked-in outputs: - `tools/settings_generated.py`, consumed by `tools/settings.py` instead of regex-translating and `exec`-ing JS files - `src/settings_generated.mjs`, consumed by `src/utility.mjs` via `structuredClone(defaultSettings)` instead of `vm.runInNewContext` - `site/source/docs/tools_reference/settings_reference.rst`, with normalized/evaluated default values Add `tomli==2.3.0; python_version < '3.11'` to `requirements-dev.txt` so Python 3.10 developers can run `tools/maint/gen_settings.py` (Python 3.11+ uses stdlib `tomllib`), and update stale `settings.js` references across tools, docs, and tests. Fixes: emscripten-core#28311
This branch has not been deployed
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.
Replace
src/settings.jsandsrc/settings_internal.jswithsrc/settings.tomlandsrc/settings_internal.tomlas the canonical source of truth for compiler setting defaults and documentation, while keeping setting metadata lists intools/settings.pyandsetLikeSettingsinsrc/utility.mjs.Add
tools/maint/gen_settings.py(replacingtools/maint/update_settings_docs.pyand wired into CI via--check) to validate the TOML files and generate checked-in outputs:tools/settings_generated.py, consumed bytools/settings.pyinstead of regex-translating andexec-ing JS filessrc/settings_generated.mjs, consumed bysrc/utility.mjsviastructuredClone(defaultSettings)instead ofvm.runInNewContextsite/source/docs/tools_reference/settings_reference.rstAdd
tomli==2.3.0; python_version < '3.11'torequirements-dev.txtso Python 3.10 developers can runtools/maint/gen_settings.py(Python 3.11+ uses stdlibtomllib), and update stalesettings.jsreferences across tools and tests.Fixes: #28311