Skip to content

Manual: build fix#690

Merged
gasche merged 4 commits intoocaml:trunkfrom
Octachron:manual_verb_fix
Jul 14, 2016
Merged

Manual: build fix#690
gasche merged 4 commits intoocaml:trunkfrom
Octachron:manual_verb_fix

Conversation

@Octachron
Copy link
Copy Markdown
Member

@Octachron Octachron commented Jul 13, 2016

This PR makes the manual build again:

  • The first commit fixes a problem with an odd number of " inside cmds/intf-c.etex
  • The second commit fixes an assertion failure within ocamldoc. However, I am worried that I have
    no idea why this assertion failure was triggered in the first place.

@gasche
Copy link
Copy Markdown
Member

gasche commented Jul 14, 2016

This feels like code pattern-matching on the arguments of a constructor declaration, assuming that they are parsed in tuple-like form, and failing on new code using inline records.

I am frustrated by the fact that I have no idea if the code you used to replace the TODO part is correct. Could you maybe add a testcase where this call is exercised, and in the commit message tell us what used to be printed and what you now get?

This commit adds a very basic handling of inline record within
exceptions for signature items. Previously, a signature like

sig
  exception E of {lbl:int}
end

would crash OCamldoc due to an assertion failure.
With this commit, the previous signature should be correctly
displayed by ocamldoc as

sig
  exception E of {lbl:int}
end

Beware, that the same exception as structure item would still
crash ocamldoc at the time of this commit.
Beware: hese tests are incomplete, due to the incomplete handling
of inline record within exception inside Ocamldoc.
This commit adds a new tests focused on the handling of inline records
by the latex generator. For now, it checks that the inline records
labels and types are at least printed within the latex file and not
replaced by `{...}`.
@Octachron
Copy link
Copy Markdown
Member Author

With further investigations, I discovered that the manual compilation was failing on the documentation for https://github.com/ocaml/ocaml/blob/trunk/utils/misc.mli#L312, due to the incomplete handling of
inline record within exceptions.

I have added two incomplete tests for these inline records in tool-ocamldoc/t04.ml for the general
handling of exception with inline record and tools-ocamldoc-2/inline_records.mli for the handling
of inline records by the latex generator.

Note that this pull request is only a partial fix, and there is still some assertion failure waiting to happen for inline records within ocamldoc, see for instance the commented example in t04.ml. Another point that might be worth to look at in the future is that for now, inline record discards field documentation comments.

@gasche gasche merged commit b8b9e0c into ocaml:trunk Jul 14, 2016
@gasche
Copy link
Copy Markdown
Member

gasche commented Jul 14, 2016

Excellent, thanks!

I created a MPR for it: MPR#7290.

camlspotter pushed a commit to camlspotter/ocaml that referenced this pull request Oct 17, 2017
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Sep 21, 2022
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
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 this pull request may close these issues.

2 participants