-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Warnings to unresolved references make odoc
unusable
#1120
Comments
Thanks for bringing this up - I totally agree that it's really important to focus on issues like this, otherwise we're putting people off making good docs. I'm very skeptical of trying to solve the issue in the way you're suggesting though - essentially I don't believe we can do anything less than generating the correct odoc files for your dependencies. I think the only reliable way to distinguish between references that will and won't resolve is to do a complete docs build for all your dependencies, and then try to resolve the references! Now, a second issue is that of partial docsets. I'm going to assume that the main reason for having partial docsets is that someone would like to publish the docs for their libraries without having to additionally publish the docs for all of their dependencies. For this, if we start from the premise that we've built docs for all our deps locally, we've got a couple of options:
I'm leaning in the second direction, but it seems likely that the path to get there would mean that implementing '1' would be trivial. Building a complete doc set is obviously not easy, but there are already several options available. Obviously there's your own odig, which is really nicely suited to producing docs for packages once they've been installed, but not quite so useful when you're still developing the docs though. There is the dune prototype -- I'm curious what you're using to build and test your docs? Anyway, clearly, fixing this isn't the only thing we need to do to make the experience of writing docs better - the duplicates @dlesbre mentioned in #1127 need a separate fix - but I'm very keen to work on these sorts of issues with high priority, as you suggest. |
If your positive that's the way, then so be it (though I fear a bit that the time to generate simple docs can explode a bit if you depend on large stuff like
Regarding partial docsets I think we should really have them, I'm fine with 1. as far as generation is concerned rather than trying to be smart but failing too often.
At the moment I'm using the |
[I react here as the solution to this issue could also solve #1144] In think this simple solution would be acceptable (and even good!) if we can define somewhere (options, config file, etc) a list of external libraries. Otherwise, how can odoc distinguish between an external lib and a misspelled lib among the ones we are just submitting? |
According to @jonludlam this should be fixed. Could you please, @jonludlam, just mention which PR and/or doc bits which implement/indicate the way drivers have to be tweaked ? After that I think this can be closed. |
I am also curious about that because basic usage of |
Currently this works by passing the flag |
I had a go at running (this isn't entirely true - there's at least one bug where dependency warnings are creeping in, for example, in the warnings when compiling frama-c there were:
which I think come from ocamlgraph) On your second point, I don't understand what you mean about having to specify all packages on which the driver is run? |
I should have read the documentation of
and I cannot really understand why. I would have expected either to have only the documentation for the Kernel (behavior in Dune if we do not provide all dune packages names) or for the kernel + all the plug-ins. Anyway, this is clearly not an issue related to this one, so I guess I should open another issue. Also found a crash when trying to get documentation for Frama-C plug-ins: #1302
For example, in
I guess the line that really triggers the error is the following line from
but it is really strange to have such a warning: Is it:
In the last case, I'd really like to understand what is wrong with the line we have written in the documentation. |
Thanks @jonludlam for the answer.
Indeed it would be nicer if that'd be something that happen at link and/or generation time rather than during |
It's entirely based around opam packages - you should get the docs for precisely the opam packages you specify and those that are dependencies. Don't forget to
Thanks!
Currently those references are resolved where the expansion is made, so if there's no module I had a go at fixing the most annoying warnings - I've got a patch that I'll make available somehow. I've also got a fix for the
|
Here's the frama-c patch - it's based on 30.0 |
I've made a PR - #1304 - with the change. The idea there is that when you're compiling an odoc file, you supply an optional key. When you subsequently do a link, you give a list of keys for which you want warnings reported. |
Does that mean that I need to invent new names ? That looks rather unconvenient. |
odoc_driver is using the package names as keys. I think that's probably the right level of granularity. |
Ok, thank you for the explanation :)
Wow! Thank a lot for this! |
I was pretty sure there was an issue about this. But I can't find one. So there it is.
I think this should really be acted upon and prioritized as
odoc
becomes quickly unusable when working on partial docsets1 and this problem has been here for ages.Let's take a simple example:
This will typically report this warning:
I really don't have the compilation pipeline of odoc in my head right now but I suspect there is a point where we can record this symbol exists despite the fact that no documentation is going to be generated for it by simply providing an appropriate include into the stdlib's library directory or the path to the
Sys.cm[i,ti]
file.I'm pretty sure people working on
odoc
have a better idea than I have of when/where in the pipeline this should be done (I vaguely remember a discussion with @trefis a few years ago where he indicated this would be possible and not too hard).(This will not work as is stands for external references into
.mld
but in my case it would, most of the time remove 100% of these warnings).Footnotes
Case in point I have a medium scale project that generates 122 warnings from links into other libraries and the
Stdlib
and it is of course no longer possible to sift through that to find out if a couple of doc strings I just wrote made wrong or ambiguous links. ↩The text was updated successfully, but these errors were encountered: