catala icon indicating copy to clipboard operation
catala copied to clipboard

`catala testcase write` generates multiple `using` directives

Open rprimet opened this issue 1 year ago • 1 comments
trafficstars

Hi,

In the catala testcase write plugin, a >Using directive is generated for each Test. (see https://github.com/CatalaLang/catala-language-server/blob/master/test-case-parser/test_case_parser_lib_atd.ml#L375 )

This means that when two tests require the same module, two "using" directives will be generated, which will occasionnally crash the compiler (for instance if an enum is defined into the required module, it will lead to a name clash apparently)

Would that be fixable? (e.g. make a set of necessary modules for each file and spit it at the beginning of the file?)

Thanks!

cc @AltGr

rprimet avatar Oct 10 '24 09:10 rprimet

Fixed on branch cnaf-demo

AltGr avatar Oct 10 '24 10:10 AltGr

TODO: check that fix is in master.

denismerigoux avatar Oct 29 '24 14:10 denismerigoux