romildo
January 18, 2022, 11:25am
1
What are minimumOCamlVersion
and minimalOCamlVersion
in nixpkgs? How do they differ?
The manual mentions only minimalOCamlVersion
:
It defines an (optional) attribute minimalOCamlVersion
that will be used to throw a descriptive evaluation error if building with an older OCaml is attempted.
I think minimumOCamlVersion
was considered inaccurate wording at some point (probably there is a discussion about this someone could dig up) and buildDunePackage
started accepting both. minimalOCamlVersion
is the proper argument and should be used going forwards.
NixOS:master
← superherointj:build-support-ocaml-dune-check-minimalOCamlVersion
opened 02:21PM - 10 Jun 21 UTC
build-support.ocaml.dune:
* accept both `minimalOcamlVersion` and `minimumOCaml… Version` silently.
To make the situation clearer, we probably should clean up remaining instances of minimumOCamlVersion
and add a deprecation warning for it.
1 Like
vbgl
January 18, 2022, 8:00pm
3
It might be worth adding a line in the documentation to warn about the old spelling.
vbgl
January 19, 2022, 1:01pm
4
See the PR below for a fix.
NixOS:master
← vbgl:manual-ocaml
opened 12:59PM - 19 Jan 22 UTC
###### Motivation for this change
Some contributors are (rightly) confused ab… out the common use in `nixpkgs` of the undocumented `minimumOCamlVersion`.
###### Things done
- Built on platform(s)
- [x] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- [ ] For non-Linux: Is `sandbox = true` set in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [22.05 Release Notes (or backporting 21.11 Release notes)](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#generating-2205-release-notes)
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [ ] (Release notes changes) Ran `nixos/doc/manual/md-to-db.sh` to update generated release notes
- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).