Closed Leonidas-from-XIV closed 1 year ago
I've realized that all the amount of patching files won't help as some package
definitions can be generated at build-time (either through dune-rule generator programs or dune
files in ML format), so it is impossible for opam-monorepo to rewrite those. My assumption that this is rare enough to be ignored hasn't been correct (as locking Irmin fails due to Alcotest defining (package)
via ML files), so it seems like this feature can't be implemented without implementing half of dune
.
In this case it is easier to implement it in dune itself and then just generate the right stanzas. I've opened an RFC for this: https://github.com/ocaml/dune/issues/7058 so in the meantime this can be closed as the feature is best scrapped.
This PR fixes issues when the deduplication is disabled that have been found while attempting to lock Irmin:
<package-name>.opam
is impossible — thus the packages need to be renamed.dune
files are not always calleddune
, sometimesdune.inc
is used for flies that are included. This is a rather mediocre fix but a proper solution that determines whichdune
files are part of the build would require lot ofdune
-specific logic that might not be worth reproducing. Hoping for an 80:20 solution here.(package <name>)
stanzas can be all over indune
files, we need to handle them in more places.