Closed ylecornec closed 1 month ago
Could these configurations be handled by dune using functionalities such as virtual libraries and/or
enabled_if
attributes ?
That should get rid of most of the uses of optcomp, yes.
To remove the nonconsensus optcomp, we'll probably need to restructure the code so that Mina_base
doesn't depend on pickles (or anything else that depends on Kimchi_bindings
). I suspect that the work to extract the types in #11101 will make this significantly easier. There will probably also have to be some tweaks to Snark_params
and friends to avoid pulling in dependencies from Kimchi_backend
too.
ppx_optcomp
is now limited to a single library since https://github.com/MinaProtocol/mina/pull/15837. Closing.
As noted in the
Codebase Improvement Ideas
on notion,ppx_optcomp
should be replaced by something else.It seems that the main use of this preprocessor is to be able to compile the code in multiple configurations, that are defined in the
src/config
folder.From what I noticed in the code base there are two important cases in particular:
Unix
and can be compiled to js.Leads:
enabled_if
attributes ?