-
Notifications
You must be signed in to change notification settings - Fork 94
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
Scan include directories for odoc files eagerly #268
Conversation
This allows early detection of problems such as there being two files of the same name in different paths (see ocaml#148 for an example) Signed-off-by: Jon Ludlam <jon@recoil.org>
Signed-off-by: Jon Ludlam <jon@recoil.org>
Signed-off-by: Jon Ludlam <jon@recoil.org>
We do eventually plan to have more disciplined error handling at the top level, but so far we've been working "bottom-up" by introducing proper error handling in the parser first, and gradually propagating new error handling up to the command-line interface level. This process has reached only the parser and parts of the loader so far, however. I'd say to do whatever you think is easiest here :) It could be the right solution for the long term, but even if not, that's okay, because then we will still address it later :) |
OK. I'll stick with raising the exception from Model.Errors and catch it right at the top. I'll need to stick in some more error handling around the eager loading too, since having just tested it on Coq I find it's failing with |
Otherwise when executing a build in parallel we try to read in incomplete odoc files even though we almost certainly don't need to read them. Signed-off-by: Jon Ludlam <jon@recoil.org>
Signed-off-by: Jon Ludlam <jon@recoil.org>
Signed-off-by: Jon Ludlam <jon@recoil.org>
You should be able to use the imports list to restrict the eager scanning to just those files we will actually use. This should remove issues with parallelism and also prevent non-reproducible documentation. Essentially you should only include files whose name matches those in the import list. There could still be problems if there are two files with the same name, and dune thinks only one of them is a dependency. So some protection for |
Ah, this sounds much better. I'll have a look. |
This is the wrong solution. |
@jonludlam Could you link to something, or state in one brief sentence what the core of the reasoning is? |
I was planning on doing so in the follow-up PR, which I have cooking. I just didn't want to waste anyones time reading this when I'm intending to do something different |
Fair enough, thanks. |
Should be very rare, see ocaml#268 for rationale Signed-off-by: Jon Ludlam <jon@recoil.org>
Goes some way to addressing #148.
This is an RFC, particularly the error handling. As is, this still results in a nasty backtrace spewed to the terminal so I don't think it should be merged yet. Before I just wrapped the invocations of Env.create in an exception handler I thought I'd better ask whether there was a better plan in mind for this sort of non-recoverable one?