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

References in module preambles aren't working as expected #585

Closed
jonludlam opened this issue Feb 11, 2021 · 3 comments · Fixed by #592
Closed

References in module preambles aren't working as expected #585

jonludlam opened this issue Feb 11, 2021 · 3 comments · Fixed by #592
Assignees
Milestone

Comments

@jonludlam
Copy link
Member

For example, use odig and look at the Astring documentation - the first link is broken {{!strf}one value}

@jonludlam jonludlam added this to the 2.0.0 milestone Feb 11, 2021
@dbuenzli
Copy link
Contributor

dbuenzli commented Feb 11, 2021

I'll take the opportunity to mention #332 and #42.

In general the resolution strategy for {!id} for needs to be clarified an properly documented, since it differs from the OCaml language.

AFAIR odoc's one always differed from ocamldoc's one. With the years I gradually fixed my links to match odoc's notion but it can become slightly verbose since there are cases where you need to qualify more (of course now I can't find an example).

OTOH I vaguely remember discussing that with @trefis which considered ocamldoc's to be too ambiguous and/or broken.

@dbuenzli
Copy link
Contributor

I just fell on the case that always bothered me with odoc. Basically the problem is that {!id} is oblivious of opens.

Suppose I have:

module Ns : sig
  module A : sig 
  end
end

Now in the following module {!A} does not get resolved:

module B sig 
   open Ns

   (** see {!A} *)

end

You have to write {!Ns.A}. I would like to be able to write {!A} that it renders as A but links to Ns.A.

It has been a long time since I haven't used ocamldoc but I believe it worked that way since I had to "fix" a lot of my mlis.

(I did not test with 2.0.0 yet)

@Julow
Copy link
Collaborator

Julow commented Feb 18, 2021

I opened a new issue for your last comment (#594) so this issue can be closed by #592

@jonludlam jonludlam changed the title References to aren't working as expected References in module preambles aren't working as expected Feb 25, 2021
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.

3 participants