Layer settings over a file that documents itself
Compiled default, then the file, then the environment -- with the environment winning, which is the reverse of the usual arrangement and is the point: LUMBRIDGE_CLAUDE_OAUTH=0 is documented as one switch off, and a switch a configuration file can silently turn back on is not a switch. Where a variable has pinned a value the settings pane shows that row disabled and names the variable rather than accepting an edit that would do nothing. default.toml carries every key Lumbridge understands, commented out, showing the compiled default, and a test uncomments them and asserts the key set is exactly the set the binary knows -- so neither half can drift from the other. toml reads and toml_edit writes, because serialising the parsed model back over the file would strip every comment and every key this build does not recognise, and here the comments are the documentation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPYebLiN2w4TqnHUYGdECq
This commit is contained in:
co-authored by
Claude Opus 5
parent
401760d670
commit
28e455f968
@@ -10,6 +10,14 @@ repository.workspace = true
|
||||
[dependencies]
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
toml = "0.9"
|
||||
# `toml` reads; `toml_edit` writes. Serialising the parsed model back over the
|
||||
# file would strip every comment and every key this build does not recognise,
|
||||
# and in this design the comments are the documentation.
|
||||
toml_edit = "0.25"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
# Already in the workspace's dependency closure via lumbridge-storage's tests.
|
||||
tempfile = "3.27.0"
|
||||
|
||||
Reference in New Issue
Block a user