Discussed with @diml offline.
Switching to library from (wrapped false) to (wrapped true) usually mean that you break most package depending on you. Dune should support a transition mode that will emit warning if modules are accessed directly.
In that mode, for every module in the lib:
- dune would generate
{MOD}.ml-gen
- compile
{MOD}.ml-gen to {MOD}.cm{i,o,x}
- include these new implementations in the archive.
{MOD}.ml-gen files would look like:
include Lib__{MOD} [@@deprecated "Use Lib.{MOD} instead."]