waleee-cl has quit [Quit: Connection closed for inactivity]
Serpent7776 has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
jlr has joined #ocaml
jlr has quit [Ping timeout: 264 seconds]
jlr has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
olle_ has joined #ocaml
bartholin has joined #ocaml
Haudegen has joined #ocaml
knuckolls has joined #ocaml
mbuf has quit [Ping timeout: 246 seconds]
knuckolls has quit [Remote host closed the connection]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
Tuplanolla has joined #ocaml
jlr has quit [Remote host closed the connection]
worc3131 has joined #ocaml
mbuf has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
jlr has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
worc3131 has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
dborisog has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
mro_name has joined #ocaml
mbuf has quit [Ping timeout: 264 seconds]
Anarchos has quit [Ping timeout: 246 seconds]
mfp has joined #ocaml
tryte_ has joined #ocaml
Anarchos has joined #ocaml
tryte has quit [Remote host closed the connection]
mbuf has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mro_name has quit [Remote host closed the connection]
dborisog has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
amiloradovsky has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
aiowej has joined #ocaml
alexo1979 has joined #ocaml
mro_name has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mbuf has quit [Ping timeout: 240 seconds]
<cemerick>
sure would be nice if all '_'-prefixed bindings were ignored like '_' is for purposes of the `Variable _foo must occur on both sides of this | pattern` error
mro_name has quit [Remote host closed the connection]
<octachron>
except that "let f _x = _x" is ugly but valid whereas "let f (Left _x | Right _y) = _x + _y" does not make sense
aiowej has quit [Ping timeout: 256 seconds]
waleee-cl has joined #ocaml
mxns has joined #ocaml
mro_name has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
mxns has quit [Ping timeout: 272 seconds]
amiloradovsky has joined #ocaml
olle_ has quit [Ping timeout: 246 seconds]
<cemerick>
octachron: I suppose implied in my notion of "ignored" was "ignored, presuming said bindings aren't referred to"
aiowej has joined #ocaml
tane has joined #ocaml
<d_bot>
<ggole> It's a bit strange that `_foo` bindings are meant to be unused but you can in fact use them
Anarchos has joined #ocaml
aiowej has quit [Ping timeout: 260 seconds]
catties has quit [Quit: =^__^=]
kitties has joined #ocaml
kitties has left #ocaml [#ocaml]
<d_bot>
<hcarty> It could be interesting to add a warning/alert that triggers when a name prefixed with `_` is referred to outside of its definition
amiloradovsky has quit [Ping timeout: 260 seconds]
<octachron>
I agree.
<cemerick>
ggole: yeah, I had always thought they were equivalent to bare `_`
<companion_cube>
hcarty: please don't
<companion_cube>
_foo is also useful when it's only used in, say, a debug message
<thizanne>
you could just not activate the warning
amiloradovsky has joined #ocaml
<companion_cube>
but some people (*cough*) think it's a good idea to use warn-error +a by default
<companion_cube>
so please don't add warnings that don't make sense
<companion_cube>
(tbh the very first thing I do when I write a dune file is to set custom flags)
<theblatte>
I wish we had that warning too, and I think it makes total sense
<theblatte>
and you seem to admit you're arguing in bad faith :p
<companion_cube>
just because I already have to circumvent bad defaults doesn't mean I want them to get worse
<companion_cube>
why is it a warning to _use_ a variable?
<theblatte>
I don't think it was suggested for it to be the default
<companion_cube>
(and no, I'm not arguing in bad faith; this is at best a linter warning, not a compiler one)
<companion_cube>
well.
<companion_cube>
with dune all warnings are default warnings, aren't they?
<theblatte>
dune has terrible defaults
<d_bot>
<ggole> If you use a variable in a message, then don't prefix it with a `_`?
<theblatte>
but warnings come from ocamlc not dune
<theblatte>
it's a warning because _foo variables have a special treatment in OCaml
<theblatte>
so it only makes sense to (be able to) warn when that special feature is misusedç
<companion_cube>
ggole: because I want to be able to remove the debug message without it becoming a warning
<theblatte>
-ç
<companion_cube>
the debug message isn't a "proper" use of the variable, if you want.
<theblatte>
companion_cube: I think that's a fine use-case for not enabling the default, but others don't use that convention
<d_bot>
<ggole> That seems like a case where you'd just turn the warning off
<theblatte>
(I don't know if dune is +a by default either)
<companion_cube>
not sure if it's +a, but it's `-warn-error +a-shitton-of-warnings`
<companion_cube>
most of them anyway
<theblatte>
yup
<companion_cube>
(which… ugh)
<theblatte>
yeah, I was hoping the defaults would change when the project became less janestreet-y, good defaults are important and the current dune ones make no sense to me. Perhaps dune defaults should even just be ocamlc defaults and the responsibility for good default warnings should be on ocamlc itself
<companion_cube>
I mean I like having more warnings
<companion_cube>
just not as errors
_bin has joined #ocaml
_bin has left #ocaml ["WeeChat 3.0"]
_bin has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mbuf has joined #ocaml
Bahman has joined #ocaml
mxns has joined #ocaml
alexo1979 has left #ocaml ["Konversation terminated!"]
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
mro_name has quit [Quit: Leaving...]
shawnw has joined #ocaml
kini has quit [Quit: bye]
kini has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
chimay[m] has joined #ocaml
dborisog has quit [Ping timeout: 240 seconds]
mxns has quit [Ping timeout: 246 seconds]
olle has quit [Ping timeout: 246 seconds]
olle has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
leah2 has quit [Ping timeout: 260 seconds]
leah2 has joined #ocaml
hnOsmium0001 has joined #ocaml
mxns has joined #ocaml
catern has quit [Quit: catern]
neiluj has joined #ocaml
neiluj has quit [Changing host]
neiluj has joined #ocaml
<d_bot>
<hcarty> Warnings as errors are only for dev builds, when it's helpful imo to have more strict checks
<d_bot>
<hcarty> (for dune)
<d_bot>
<hcarty> Warnings and alerts can be disabled locally so the debug log case can be handled that way
TheLemonMan has joined #ocaml
<d_bot>
<hcarty> I haven't written linting rules for OCaml before so I don't know how difficult it would be to check if a value is used. But having this as an alert or warning seems like a natural fit since the compiler has the machinery to make that check
<d_bot>
<hcarty> The applicability of dune's default set of warnings depends on the domain a project is in. I appreciate how strict dune is by default because those defaults help catch a lot of easy to make mistakes early
<d_bot>
<hcarty> In lots of other legitimate cases I and others may not care, particularly if nthe code is for an interactive tool or a script-like bit of code
<companion_cube>
@hcarty: I still disagree with that
<companion_cube>
I don't want to come back to a project with a newer OCaml and suddenly it doesn't compile anymore
<companion_cube>
even in dev mode
<companion_cube>
that's just bullshit
<d_bot>
<hcarty> I can see that point - warning coverage details do change significantly sometimes between releases
<d_bot>
<hcarty> I disagree though. If the warning provides useful extra coverage then I want to know about that
<d_bot>
<hcarty> Again, there are going to be domain differences
<companion_cube>
you know about that because they're warnings
<companion_cube>
they still shouldn't break the build
<companion_cube>
in particular because someone cloning the repo and running `dune build` (as one does) now sees a failure
<companion_cube>
(so much for the backward compatibility promises when you use dune)
<companion_cube>
of course the build will be broken anyway because of opam, but that's another problem.
nicoo has quit [Remote host closed the connection]
<d_bot>
<hcarty> Again, if there's a warning that's reporting something dangerous I want it to fail
<companion_cube>
like, warning 50?
<d_bot>
<hcarty> I'll admit, I don't know warnings by number
<companion_cube>
the docstring one
<companion_cube>
like ambiguous docstring
<companion_cube>
lots of warnings are also extremely bothersome when you're experimenting (not when you're getting closer to a release)
<d_bot>
<hcarty> Ah, that's actually saved me a few times from a docs standpoint
<companion_cube>
sure, but should it makes a normal build fail?
<d_bot>
<hcarty> I do think a dune "wtf I don't care" mode would be useful
<d_bot>
<hcarty> In the case of a library, a normal build checking doc validity is worthwhile in my experience
<companion_cube>
the worst offender of all, of course, is the deprecation warning
<companion_cube>
the times before yojson 1.6
<companion_cube>
😱
<companion_cube>
it's a recurrent discussion anyway
<samoht[m]>
(to add oil on the fire: I like having warning as errors in dev mode)
<d_bot>
<Anurag> outside of the deprecation warnings being errors, i've liked warnings and errors for the most part. (specially in a work setting in a largish project).
<companion_cube>
I like warnings too
nicoo has joined #ocaml
mbuf has quit [Quit: Leaving]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
<d_bot>
<hcarty> Warnings as not-errors end up as noise once a project gets to be at all established. If a warning continues to fire it makes sense to disable it across an appropriate context or make it an error and address the issue in code
raver has quit [Quit: Gateway shutdown]
raver has joined #ocaml
l1x has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
<companion_cube>
I can agree with that
<companion_cube>
it's just not friendly at all for people who don't write ocaml all day
<companion_cube>
it's certainly good for JST
<d_bot>
<hcarty> Yeah there's a tradeoff made in favor of keeping code up to date with the latest and greatest versus keeping code as compilable as possible as the rest of the ecosystem moves forward
neiluj has quit [Remote host closed the connection]