Remove ocaml-system from the list of default compilers used during opam init#6307
Conversation
|
Discussion on dev meeting: For a transition phase, we should detect presence of a system ocaml and display a hint for the command to run to have by default ocaml-system. |
b2e9263 to
0ea4264
Compare
I'm not sure if we want that, reading such a message would be confusing to users. I would rather make it clear on the release note instead.
I'm not sure to understand what you mean. As far as i know |
0ea4264 to
e002d57
Compare
rjbou
left a comment
There was a problem hiding this comment.
I've added a commit to label the test to show their purpose, and a commit that contains a proposal to modify the tests :
- I:3: show the defaut, so it is updated to show base compiler selection
- I:4: added to show the behaviour of system compiler explicit selection
| ### <opamrc> | ||
| eval-variables: [ sys-ocaml-version ["echo" "4.07.0"] "new system compiler" ] | ||
| ### opam init --no-setup --bypass-checks default REPO/ --config opamrc | grep -v Cygwin | ||
| ### opam init --no-setup --bypass-checks default REPO/ --config opamrc -c ocaml-system | grep -v Cygwin |
There was a problem hiding this comment.
The purpose of the test is to show the default chosen compiler, so there is no need to add ocaml-system compiler in cli. A new test should be added to show the behaviour when choosing ocaml-system
There was a problem hiding this comment.
I'm not sure to understand. This goes against what you asked for on your last review: #6307 (comment)
There was a problem hiding this comment.
I forgot that i proposed that months ago. Looking deeper this time for a proper review I think it is better to keep the idea of the test (it is now labeled: what should be the default choice and how opam should behave), and add another for ensuring that ocaml-system is well installed when requested, and how (invariant, etc.)
…am init Co-authored-by: Raja Boujbel <raja.boujbel@ocamlpro.com>
e002d57 to
7a06496
Compare
This makes sure opam switches do not end up with ocaml-system unknowingly. opam switches can still use it as long as that requirement is explicit. This fixes a large number of issues encountered by users. See ocaml/opam#6494 and ocaml/opam#6307
Fixes #3509
I don't think having
ocaml-systemin the list of default compiler is a good choice.Most platforms actually won't work if you installed the
ocamlpackage alone. They usually all require some sort of extraocaml-compiler-libsto be complete and not end up in very confusing error messages for new users.System compilers are also not tested in the CI for opam-repository as of today (see ocurrent/opam-repo-ci#327) and end up breaking packages from time to time.
Experienced developers can always use
opam init -c ocaml-systemif they really want a system compiler andocaml-systemcan always be installed explicitly later if needed, but as a default for everyone it seems to brittle to me.