opam files from template generated with carriage return on windows
Reproduction case in https://github.com/ocaml/dune/pull/9481
When generating opam file on windows from templates, carriage returns get added to the output of the opam file. This will later be stripped by git but causes necessary diffs (and promotions) for windows users.
What's worse, when I revert the spurious diff, dune build -w results in errors like these for me:
Error: rename(.#printbox-ext-plot.opam.dune-temp): Permission denied
-> required by _build/default/printbox-ext-plot.opam
-> required by alias all
-> required by alias default
Had 1 error, waiting for filesystem changes...
Re-running dune build re-creates the spurious diffs.
See https://github.com/ocaml/dune/issues/8358#issuecomment-2585856282
@lukstafi That's interesting. Are you first promoting and then reverting whilst watch mode is running?
Apologies for delay, I'll reply when I'm back on my Windows machine.
@Alizter However, the quick answer is that yes, I'm reverting while dune build -w (watch mode) is running, that's causing the error above, and I'm not explicitly promoting since I have generate_opam_files: yes.