You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
con4m gen ${SPEC} --language=nim --output-file=${OUTFILE}
else
echo No change to chalk.c42spec
fi
""")
Then running chalk:
Runs con4m code to load and validate the chalk config (which doesn't change)
Uses that environment to load and validate the built-in configs
Uses that environment to load and validate any user-supplied config
This also involves flushing the con4m attribute state to the Nim-native data structures a few times, so it stays synced.
Future flow
con4m v2 allows chalk to save and restore runtime state by embedding an object file into the chalk binary, such that chalk can perform only the necessary work that would change per-invocation (like user-supplied config). This should reduce complexity overall in configuration loading - there's no more stacking.
That is, with con4m v2, building chalk should:
Run the chalk configuration, generating an object file
Embed that object file into chalk
Then running chalk should:
Restore the state from the object file
Partially process the command-line to find external configs
Process those external configs
Perform the requested operations
Eventually we may want to allow pre-compiling user-configs for later runs, but that introduces significant complexity for much less important gains.
con4m was rewritten with v2, most importantly to:
Current flow
Currently, building chalk execs the
con4m
executable to generatec4autoconf.nim
for Nim-native data structures and getter procs:chalk/chalk.nimble
Lines 54 to 60 in 4157b58
Then running chalk:
This also involves flushing the con4m attribute state to the Nim-native data structures a few times, so it stays synced.
Future flow
con4m v2 allows chalk to save and restore runtime state by embedding an object file into the chalk binary, such that chalk can perform only the necessary work that would change per-invocation (like user-supplied config). This should reduce complexity overall in configuration loading - there's no more stacking.
That is, with con4m v2, building chalk should:
Then running chalk should:
Eventually we may want to allow pre-compiling user-configs for later runs, but that introduces significant complexity for much less important gains.
There are also breaking changes in the language.
Refs: #26
Refs: #214
The text was updated successfully, but these errors were encountered: