Remove patched copy of stdlib Format once ocaml/ocaml#1229 is merged
Currently building ocamlformat downloads and patches the standard library Format module. Once ocaml/ocaml#1229 is merged:
- [ ] delete the download-and-patch build hackery
- [ ] remove / rename
Format_andFormat - [ ] remove warning about downloading LGPL code from README
- [ ] delete the download-and-patch build hackery
Regarding this it would really be nice if we could avoid having this in the opam repo. In general packages should not access the network in the install: phase. Couldn't you just check-in these files and distribute your project under a mixed "LGPL+MIT" license meanwhile ?
Thanks for pointing out the issue with accessing the network during install:, I wasn't aware of that.
Regarding redistributing the stdlib files, and using a mixed license: that is a question that came up before release during discussion with the legal team and the current patching approach is where we settled.
It would be unfortunate if it means that installation will need to be via opam pin in the meantime.
Thanks for pointing out the issue with accessing the network during
install:, I wasn't aware of that.
There's no strong policy in place right now. But sandboxing the builds has been discussed more than once and could become a reality in the future. Packages downloading random things from URL outside from the tarball during the install phase is a security nightmare.
It also breaks the opam offline workflows.
It would be unfortunate if it means that installation will need to be via
opam pinin the meantime.
It seems the patch you need is not even in 4.06 so the situation is likely to last for sometime, as such it would be preferable to avoid the download thing.
If you want to avoid the mixed license you could simply do a separate ocamlformat-support package that has the patches/support files and make your package depend on this --- of course this incurs a bureaucratic cost.
@jberdine , would it be possible to add or point to few ocamlformat examples where the conditional printing introduced by ocaml/ocaml#1229 is used to ocaml/ocaml#1229 itself?
https://github.com/ocaml/ocaml/pull/1229#issuecomment-338430936
@dbuenzli - thanks for the suggestion of a separate package for the patched version of Format. I am investigating, but cannot predict legal points.