New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wish: -dsource/-dparsetree for ocamldep #6730
Comments
Comment author: @gasche This looks like an ocamldep bug. I'm not opposed to adding -dsource for debuggability, but if you're going to have to change the ocamldep sources to fix the issue anyway, why not directly dive in and debug it by temporarily instrumenting it with an extra print-ast call? |
Comment author: @whitequark I've changed my code since then, and I did not have time to debug ocamldep at the moment. So I filed the bug to at least simplify debugging for whoever encounters this next. |
Comment author: @damiendoligez I don't think this is pressing enough that it should go into 4.02.2. Speak up if you disagree. |
Comment author: @alainfrisch GitHub PR welcome! |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Still an issue. |
Does ocamldep really need to have a duplicate |
Yes. The problem is that some ppx extensions (ones that read generated files, like .cmi or .cmt) have to return different parsetrees depending on whether they run as a part of ocamldep or ocamlc, since the generated files may not have been generated yet. Admittedly an obscure use case. |
If your ppx have two modes, couldn't you just run the ppx in an ocamldep-debug mode with |
Probably not common at all. @gasche thought this is an issue; if you'd like to close this as something upstream isn't interested in, I'm not strongly opposed. |
I think it is best to close the issue for now as a too specialized issue for adding a generic flag to ocamldep. If the issue rears it head again, we will reopen it with more data points proving that the issue is not that uncommon. |
I think ocamldep should, morally speaking, have had that flag in first place (like any other tool that processes OCaml source and runs ppx extensions!) but no objection to closing. |
Original bug ID: 6730
Reporter: @whitequark
Status: acknowledged (set by @damiendoligez on 2015-01-09T17:10:58Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.02.1
Target version: undecided
Category: tools (ocaml{lex,yacc,dep,debug,...})
Bug description
I currently have a mysterious failure of ocamldep when it does not output any dependencies with a certain set of -ppx. However the file itself compiles fine. I'll not be able to debug that without a -dparsetree or equivalent.
The text was updated successfully, but these errors were encountered: