ocamlearlybird icon indicating copy to clipboard operation
ocamlearlybird copied to clipboard

`Typenv__Envaux_hack.Error(...)` and Dune integration

Open hackwaly opened this issue 4 years ago • 4 comments

Since debug informations provided by bytecode file sometimes are not enough to use to debug. It is a good point that if we can use merlin config produced by dune.

And we can upgrade the user experience by available to list debuggable programs via dune integration.

image

hackwaly avatar Feb 12 '21 16:02 hackwaly

Hello, i am very new to ocaml, so please do not be angry with me! I am having trouble understanding the difference between using ocamlc -g main.ml approach and compiling using dune producing main.bc file. Is it only used to debug utop examples? What is the difference between the files produced by ocamlc -g and dune produced *.bc file? How different is it from "traditional" approach? You still provide lanch.json file. I am very confuse... Could somebody explain? Thanks in advance!

PavelKotov1 avatar Feb 13 '21 00:02 PavelKotov1

It is my impression dune might have stopped or may stop producing those .merlin files replacing them with a new command

dune ocaml-merlin

Or that it may still be producing .merlin files but this is supposed to be better.

I understand it may work a little like LSP: you start dune process with this command, feed requests to its stdin and read answers from stdout. This is touted to be a better facility as you presumably can ask questions about particular source files rather than get folder-level info.

I haven't found many references online but links from changelog provide useful info

atagunov avatar Feb 16 '21 20:02 atagunov

Thank you. I have found this command and dune describe command both can be used. I'm investigating which is best fit our case.

hackwaly avatar Feb 16 '21 23:02 hackwaly

ref https://github.com/ocaml/dune/issues/4263

hackwaly avatar Feb 19 '21 16:02 hackwaly