cs2modrewrite does not specify encoding when performing file IO on the malleable c2 profile. This causes errors with certain linux distributions, because older versions of these distributions use alternative encoding than utf-8. To fix this issue, we use ansible to modify the sourcecode of cs2modrewrite. We standardize the encoding for file IO to be utf-8.
Motivation and context
This work is necessary for the program because we want to make sure our code is working across as many platforms as possible. We also want to ensure we pass all the molecule test cases.
Implementation notes
The modification is done via ansible role, regex pattern to find the lines to be changed.
💡 Summary
cs2modrewrite does not specify encoding when performing file IO on the malleable c2 profile. This causes errors with certain linux distributions, because older versions of these distributions use alternative encoding than utf-8. To fix this issue, we use ansible to modify the sourcecode of cs2modrewrite. We standardize the encoding for file IO to be utf-8.
Motivation and context
This work is necessary for the program because we want to make sure our code is working across as many platforms as possible. We also want to ensure we pass all the molecule test cases.
Implementation notes
The modification is done via ansible role, regex pattern to find the lines to be changed.