Warnings: documentation, UI, choice of defaults, synchronization with Dune #12557
Replies: 5 comments
-
The information on whether a warning is active could also be given in the I like your idea of reclaiming some choices regarding warnings. One important aspect that is only touched in your question is whether we should do some spring cleaning and change the warnings we enable by default. We have not done it in the last few years, and it did not matter because everyone is using the dune presets anyway. If we want to reach a convergence/consensus between stock OCaml and dune, we should look critically at our current default set -- it is easy to change it as it has very few direct users. |
Beta Was this translation helpful? Give feedback.
-
It sounds rather confusing to say that "default" is not "reasonable". If the default is unreasonable why not change it? Configurations which may make sense IMO:
|
Beta Was this translation helpful? Give feedback.
-
Yes, changing the warnings we enable by default is also on the table. I would not use the "very few direct users care anyway" argument, as I'm one of those few :-), but there are old choices that should be reconsidered, as we did in #10140. |
Beta Was this translation helpful? Give feedback.
-
That would be nice. I don't think micro managing warnings is that useful, except for selectively disabling them on a portion of code. That in turn would allow different build systems to agree on default sets via upstream and automatically evolve them as the language evolves.
To try to characterize that a bit more:
With the idea that each set is contained in the other. I'm however curious as what the difference between |
Beta Was this translation helpful? Give feedback.
-
Don't be fixated on my choice of "default" and "reasonable" words, it was just an example, and I agree "basic" and "extended" would work better. But I do think some OCaml warnings should remain off for most code bases, such as warning 4 fragile-match, as it leads to writing convoluted and non-idiomatic pattern matchings. |
Beta Was this translation helpful? Give feedback.
-
There's a discussion at ocaml/dune#8645 on Dune's infamous choice of having more warnings active by default than the core compilers and making these warnings into errors. The Dune maintainers seem open to change this, but several improvements to the core system should be considered in parallel:
K
means "all 'unused' warnings". Why not having long names too?-Wall
and "all" is-Wall -Wextra -Wpedantic
.I'm sure there are other improvements that can be considered. Let's discuss them here?
Beta Was this translation helpful? Give feedback.
All reactions