-
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
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? |
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: