chalk icon indicating copy to clipboard operation
chalk copied to clipboard

con4m v2 prep: stop using autogenerated con4m API

Open miki725 opened this issue 11 months ago • 0 comments

currently con4m autogenerates a bunch of nim code in src/c4autoconf.nim which we use to reference con4m config values across the codebase.

we wont be autogenerating same config utils in con4m v2 https://github.com/crashappsec/con4m/tree/jtv/v2. To help to fascilitate migration to v2, we can migrate all autogenerated calls to use con4m getters/settings now which will eventual migration to v2.

for example places like

https://github.com/crashappsec/chalk/blob/72a92cc3a4d3bb1beb03606e7a8d0863f88225e8/src/selfextract.nim#L301

will need to migrate to direct con4m getters. dont remember exact API as of now but it will need to use existing con4m getters:

https://github.com/crashappsec/con4m/blob/fad5f9719f6123d0c587c5424a8876eca410be64/files/con4m/st.nim#L207-L268

once this is refactored it should make migration to v2 a lot easier as hopefully well be able to batch replace most getters/setters to v2 API as well as change all the relevant con4m definitions in chalk

miki725 avatar Feb 26 '24 15:02 miki725