Skip to content

ocamldoc: centralize lexical convention before utf-8#12662

Merged
Octachron merged 1 commit intoocaml:trunkfrom
Octachron:ocamldoc_less_str
Oct 24, 2023
Merged

ocamldoc: centralize lexical convention before utf-8#12662
Octachron merged 1 commit intoocaml:trunkfrom
Octachron:ocamldoc_less_str

Conversation

@Octachron
Copy link
Copy Markdown
Member

This PR proposes to remove one redundant definition of OCaml lexical conventions in the ocamldoc parser to make it easier to make ocamldoc support utf8 encoded latin-9 in the future version of #11736 .

This is done by moving some of the lexing in the ocamldoc parser to the ocamldoc lexer.

Copy link
Copy Markdown
Member

@gasche gasche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, and the resulting code is simpler than the existing code.

(As discussed with @Octachron: maybe we should think of actively retiring ocamldoc, so that we don't have to do this kind of maintenance anymore.)

@gasche
Copy link
Copy Markdown
Member

gasche commented Oct 14, 2023

The Windows CI fails due to the test memory-model/forbidden (in bytecode) which is known to be flaky (#12425). This is unrelated to the PR, which is good to merge modulo the minor renaming suggestion.

@gasche
Copy link
Copy Markdown
Member

gasche commented Oct 24, 2023

@Octachron the hygiene check is failing as you need to run depend or alldepend.

CheckDepend: failure with the following differences:
diff --git a/.depend b/.depend
index 8aa50b9..c79bd2b 100644
--- a/.depend
+++ b/.depend
@@ -8641,12 +8641,10 @@ ocamldoc/odoc_parameter.cmi : \
     typing/types.cmi \
     ocamldoc/odoc_types.cmi
 ocamldoc/odoc_parser.cmo : \
-    otherlibs/str/str.cmi \
     ocamldoc/odoc_types.cmi \
     ocamldoc/odoc_comments_global.cmi \
     ocamldoc/odoc_parser.cmi
 ocamldoc/odoc_parser.cmx : \
-    otherlibs/str/str.cmx \
     ocamldoc/odoc_types.cmx \
     ocamldoc/odoc_comments_global.cmx \
     ocamldoc/odoc_parser.cmi

@gasche
Copy link
Copy Markdown
Member

gasche commented Oct 24, 2023

(I would squash the commits together in your stead.)

@Octachron Octachron merged commit f9371a2 into ocaml:trunk Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants