@@ -70,9 +70,11 @@ directives as needs** and the index is empty.
7070 ` metamodel.yaml ` before ` score_sync_toml ` runs.
71712 . Generating the ` [[needs.types]] ` TOML entries in memory with only the fields
7272 ubCode requires: ` directive ` , ` title ` , ` prefix ` , and optionally ` color ` / ` style ` .
73- 3 . Writing the result (combined with fields and links) into a temporary file and
74- appending it to ` needscfg_merge_toml_files ` so it is merged into the
75- final ` ubproject.toml ` .
73+ 3 . Writing the result (combined with fields and links) to
74+ ` needs_metamodel_generated.toml ` in ` confdir ` and appending it to
75+ ` needscfg_merge_toml_files ` so it is merged into the final ` ubproject.toml ` .
76+ A deterministic path is used so the file is always overwritten and no
77+ temporary files accumulate.
7678
7779### 5. Relative path handling
7880
@@ -106,7 +108,7 @@ score_metamodel.setup() ──► app.config.needs_types (Python objects)
106108 _generate_needs_links_toml()
107109 │
108110 ▼
109- <temp file> .toml ─────── ───────────┐
111+ needs_metamodel_generated .toml ───────────┐
110112 │
111113shared.toml ──────────────────────────────────────────────────┤ merge via
112114 │ needs_config_writer
@@ -123,11 +125,12 @@ app.config (all other needs_* settings) ─────────────
123125
124126## Generated files
125127
126- Both files are written to ` confdir ` (the ` docs/ ` directory) on every Sphinx build
127- and are committed to the repository so that ubCode works without needing to run a
128- build first.
128+ All three files are written to ` confdir ` (the ` docs/ ` directory) on every Sphinx
129+ build and are committed to the repository so that ubCode works without needing to
130+ run a build first.
129131
130132| File | Generated by | Used by |
131133| ---| ---| ---|
132134| ` ubproject.toml ` | ` needs_config_writer ` + merges above | ubCode language server |
133135| ` schemas.json ` | ` score_metamodel.sn_schemas.write_sn_schemas ` | ubCode + sphinx-needs schema validation |
136+ | ` needs_metamodel_generated.toml ` | ` score_sync_toml ` (` _generate_needs_types_toml ` etc.) | Intermediate merge input for ` needs_config_writer ` |
0 commit comments