Expected behaviour: The existing configurations in ralph.json should remain unchanged, and only the missing
ignoreUnusedFunctionReturnWarnings should be added with a default value, along with other updated configs in alephium.config.ts.
Actual behaviour:
All existing configurations are overwritten to false.
It also overwrites contractPath from "my_code" to "contracts".
This occurs because the JSON parser in the build process requires all configurations to be present in order to create the config object RalphcConfigState.Parsed, which becomes unavailable to TSBuild.
Issue
The
alephium.config.ts
build overwrites ALL configured values when one of the configs is missing.Reproduce
Update
ralph.json
to following, where theignoreUnusedFunctionReturnWarnings
config is missing:Create, edit or save
alephium.config.ts
the following configurations, soTSBuild
process gets triggered:ralph.json
should remain unchanged, and only the missingignoreUnusedFunctionReturnWarnings
should be added with a default value, along with other updated configs inalephium.config.ts
.false
.contractPath
from"my_code"
to"contracts"
.Cause
This occurs because the JSON parser in the build process requires all configurations to be present in order to create the config object
RalphcConfigState.Parsed
, which becomes unavailable toTSBuild
.Solution
PR #272 resolves this.