rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
williewillus_ has joined #ocaml
rgrinberg has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
raskol has joined #ocaml
chrisz has quit [Ping timeout: 268 seconds]
chrisz has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
thermo has joined #ocaml
raskol has quit [Ping timeout: 248 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
John_Ivan has quit [Ping timeout: 256 seconds]
zebrag has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mbuf has joined #ocaml
azimut_ has quit [Ping timeout: 268 seconds]
williewillus_ has quit [Quit: Leaving]
Serpent7776 has joined #ocaml
olle has joined #ocaml
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
<olle>
So, professional-level error messages in a compiler is *hard*
<olle>
Or?
kakadu has joined #ocaml
kakadu has quit [Client Quit]
kurfen has quit [Ping timeout: 268 seconds]
bartholin has joined #ocaml
kurfen has joined #ocaml
mjacob has quit [Ping timeout: 244 seconds]
mjacob has joined #ocaml
omegatron has joined #ocaml
dianshi has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 256 seconds]
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
trev has joined #ocaml
Haudegen has joined #ocaml
dh` has quit [Ping timeout: 256 seconds]
raskol has joined #ocaml
raskol has quit [Ping timeout: 268 seconds]
cedric has joined #ocaml
raskol has joined #ocaml
hannes has joined #ocaml
cedric has quit [Quit: Konversation terminated!]
<Leonidas>
Armael: I'm looking at the ^^^^^^ highlighting in the compiler and wonder, is there a way to trigger its display programmatically? I currently print the error message with Location.report_exception but it doesn't highlight the source location
<Leonidas>
Fardale: yes, kind of. The thing is I'm getting all these fun exceptions from the execution of the code and I am wondering how to reliably get the beginning and end locations of the issues (that I need for pp_loc's Position.t)
<Leonidas>
And maybe I can get away without having to use pp_loc, if I can coerce the compiler to print it by itself
<companion_cube>
it's tricky and the compiler is full of global state
<Leonidas>
Also compiler libs are unstable between versions, so it might end up painful
<companion_cube>
s/might/will/
<companion_cube>
(also it depends on whether you have a tty, non dummy TERM var, etc.)
waleee has joined #ocaml
Serpent7776 has quit [Quit: WeeChat 1.9.1]
raskol has quit [Ping timeout: 268 seconds]
trev has quit [Remote host closed the connection]
<Armael>
Leonidas: what's your setup exactly? are the errors / locations that you want to print something that you emitted yoursefl?
<Armael>
I don't remember exactly how it works in the compiler tbh
<companion_cube>
it changes from version to version
<Armael>
what changes?
<companion_cube>
error reporting
<Armael>
but yeah using Pp_loc is probably easier than trying to hook up with the compiler if you're just trying to print your own errors
<companion_cube>
I think it's becoming cleaner, but it changes
<Armael>
not sure that the location printing code is changing tho?
<companion_cube>
e.g. it's only in 4.13 or 4.14 that the compiler has started re-emitting all warnings when you recompile a file, I think?
<companion_cube>
ah, maybe not.
<Armael>
but theres possibly a hook in Location that you can redefine if you wanna be dirty
<Armael>
Location.register_error_of_exn possibly
<Armael>
iirc that's what the rest of the compiler uses to turn exceptions into error reports
<Armael>
not sure where the exn handler for that is installed tho, might only work if you're invoking a normal compiler entrypoint
<Armael>
(sorry, not in front of a PC so my investigation abilities are limited :p)
sagax has quit [Ping timeout: 248 seconds]
rgrinberg has joined #ocaml
Serpent7776 has joined #ocaml
azimut has joined #ocaml
zebrag has joined #ocaml
<sim642>
companion_cube, what? isn't that just a dune/etc thing that you don't get warnings again because the file isn't simply recompiled?
<companion_cube>
maybe it's dune that does that, I'm honestly not sure
<sim642>
It often trips me up as well because the first time I see a warning, I was in the middle of something and don't immediately fix it, but then later forget since I don't see it again
<sim642>
Maybe it's the secret reason dune has warnings as errors by default
<sim642>
It just doesn't want to deal with somehow remembering warnings and reprinting them for untouched files
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
mbuf has quit [Quit: Leaving]
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]