Skip to content
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

Documentation, Documentation, Documentation and backtraces #209

Closed
fxfactorial opened this issue Jan 15, 2016 · 0 comments · Fixed by #210
Closed

Documentation, Documentation, Documentation and backtraces #209

fxfactorial opened this issue Jan 15, 2016 · 0 comments · Fixed by #210

Comments

@fxfactorial
Copy link

I'm having a hard time getting a backtrace from Lwt.

The main page of Lwt's documentation http://ocsigen.org/lwt/2.5.1/manual/manual has just this

"Backtrace support

When using Lwt, exceptions are not recorded by the ocaml runtime, and so you don't get backtraces. However it is possible to get them when using the syntax extension. All you have to do is to pass the -lwt-debug switch to camlp4:

$ ocamlfind ocamlc -syntax camlp4o -package lwt.syntax
-ppopt -lwt-debug -linkpkg -o foo foo.ml"

Okay, but I'm using PPX which is being pushed by the community and I'm using oasis which is also pushed heavily by the community.

  1. Assume I used camlp4, where is the mention of how to turn on backtraces with oasis?
  2. If camlp4 is mentioned at all, why isn't PPX mentioned?
  3. Okay, let's go to http://ocsigen.org/lwt/2.5.1/api/Ppx_lwt

which says:

"Debug

By default, the debug mode is enabled. This means that the backtrace versions of the bind, finalize and catch functions are used, enabling proper backtraces for the Lwt exceptions.

The debug mode can be disabled with the option -no-debug."

And yet I'm using lwt.ppx and get an exception, for reasons unknown, in my async_exception_hook of Unix.Unix_error(Unix.ENOTCONN, "shutdown", "") with no backtrace.

Also, docs have an example of write stdio "Hello, " >> write stdio "world!" but >> doesn't come up in ocp-browser or in Lwt.Infix.

I understand that documentation is hard, but some consistency in the docs would be nice.

And since the OCaml community tells everyone to "Don't write your own makefiles, use oasis", it would be nice to have build commands including all the esoteric flags expressed in oasis as well as command line usage.

(Yes, I understand the maintainers are probably overworked or don't necessarily care about what I need out of Lwt, so I'll be looking at fixing the documentation as well.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant