iden3/circom

Circuit named main.circom produced malformed code when using --c

StefanosChaliasos opened this issue · 2 comments

If you save any circuit in a file named main.circom and use the --c option, the compiler will produce malformed cpp files. As a quick fix, I propose just printing a warning message when someone tries to use --c with a file called main.circom (and maybe adding a warning in the documentation).

Hi!

Thank you for reporting this issue. We have solved it in our last release (v2.1.6). In the current version if the name of the circuit is main.circom (or any of the other reserved names) and the --c flag is activated, we rename the file adding _c at the end of the name and print a warning. This way, if the circuit is named main.circom and the --c flag is used, then the generated files are renamed to main_c

Great! Thanks a lot!