Skip to content

Fix tests on <= 4.06 #738

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

Merged
merged 7 commits into from
Sep 24, 2021
Merged

Fix tests on <= 4.06 #738

merged 7 commits into from
Sep 24, 2021

Conversation

Julow
Copy link
Collaborator

@Julow Julow commented Sep 24, 2021

The canonical test revealed a subtle bug: #737
The 'references_to_pages.t' test had a typo in it.

The attachment of stop-comments changed in OCaml 4.04.2:
ocaml/ocaml#872

With older versions, the module `X` won't be hidden in the following
example because both stop-comments would be attached as attribute and
would loose their relative positions:

    (**/**)
    module X : sig end
    (**/**)

Was interpreted like:

    (**/**)
    (**/**)
    module X : sig end
@jonludlam
Copy link
Member

Seems that we've been running without ocaml-ci for some time!

@asavahista
Copy link
Contributor

when i built i get some warnings, not sure if they're in scope here:
mdx warns on test/xref2/*/*.md with OCaml toplevel block without trailing ;; which is apparently deprecated.
the other error output from build originates from test/generators/cases. some are intentional, others maybe not. either way i think they shouldn't output anything if they succeed, just like cram tests

`test/generators/cases` errors
File "cases/markup.mli", line 157, characters 4-16:
'{!modules ...}' should not be empty.
File "cases/markup.mli", line 159, characters 4-21:
Failed to resolve reference unresolvedroot(Z) Parent_module: Lookup failure (root module): Z
File "cases/markup.mli", line 159, characters 4-21:
Failed to resolve reference unresolvedroot(Y) Parent_module: Lookup failure (root module): Y
File "cases/markup.mli", line 159, characters 4-21:
Failed to resolve reference unresolvedroot(X) Parent_module: Lookup failure (root module): X
File "cases/markup.mli", line 158, characters 4-17:
Failed to resolve reference unresolvedroot(X) Parent_module: Lookup failure (root module): X
File "ocamlary.odoc":
Couldn't find the following modules:
  Stdlib
File "cases/ocamlary.mli", line 1053, characters 74-110:
Failed to resolve reference unresolvedroot(Only_a_module).t Couldn't find "Only_a_module"
File "cases/ocamlary.mli", line 1053, characters 41-71:
Failed to resolve reference unresolvedroot(Only_a_module).t Couldn't find "Only_a_module"
File "cases/ocamlary.mli", line 1028, characters 4-41:
Failed to resolve reference unresolvedroot(SuperSig).SubSigA.subSig Couldn't find label "subSig"
File "cases/ocamlary.mli", line 1021, characters 45-79:
Failed to resolve reference unresolvedroot(SuperSig).SubSigA.subSig Couldn't find label "subSig"
File "cases/ocamlary.mli", line 899, characters 49-79:
Failed to resolve reference unresolvedroot(CanonicalTest).Base__.List.t Couldn't find "Base__"
File "cases/ocamlary.mli", line 899, characters 16-44:
Failed to resolve reference unresolvedroot(CanonicalTest).Base__.List Couldn't find "Base__"
File "cases/ocamlary.mli", line 898, characters 53-86:
Failed to resolve reference unresolvedroot(CanonicalTest).Base__Tests.L.id Couldn't find "Base__Tests"
File "cases/ocamlary.mli", line 898, characters 16-48:
Failed to resolve reference unresolvedroot(CanonicalTest).Base__Tests.C.t Couldn't find "Base__Tests"
File "ocamlary.odoc":
Failed to lookup type identifier((root Ocamlary).CanonicalTest, false).Base__.List.t Parent_module: Parent_module: Find failure
File "cases/ocamlary.mli", line 857, characters 4-58:
Failed to resolve reference unresolvedroot(Dep4).T Couldn't find "T"
File "cases/ocamlary.mli", line 857, characters 4-58:
Failed to resolve reference unresolvedroot(IncludeInclude1).IncludeInclude2 Couldn't find "IncludeInclude2"
File "cases/ocamlary.mli", line 853, characters 4-68:
Failed to resolve reference unresolvedroot(DocOckTypes) Parent_module: Lookup failure (root module): DocOckTypes
File "cases/ocamlary.mli", line 182, characters 4-15:
Failed to resolve reference unresolvedroot(Buffer).t Couldn't find "t"
File "cases/ocamlary.mli", line 176, characters 34-60:
Failed to resolve reference unresolvedroot(SuperSig).SubSigB.subSig Couldn't find "subSig"
File "cases/ocamlary.mli", line 176, characters 4-30:
Failed to resolve reference unresolvedroot(SuperSig).SubSigA.subSig Couldn't find "subSig"
File "cases/ocamlary.mli", line 68, characters 41-53:
Failed to resolve reference unresolvedroot(indexlist) Couldn't find "indexlist"
File "type.odoc":
Couldn't find the following modules:
  CamlinternalFormatBasics

@Julow Julow force-pushed the fix-subst-test-406 branch from 4398d48 to 959d5c8 Compare September 24, 2021 13:30
Mdx 1.11.0 requires every top-level phrases to end with ';;', like the
real top-level.
@Julow Julow force-pushed the fix-subst-test-406 branch from 9291d02 to 7c98083 Compare September 24, 2021 14:40
@Julow
Copy link
Collaborator Author

Julow commented Sep 24, 2021

Thanks for looking ! I took these errors for granted and never tried to investigate them in details.
Generator tests shouldn't have errors on purpose, so I removed those.

I found two bugs when debugging ocamlary:

@jonludlam jonludlam merged commit 7888a9f into ocaml:master Sep 24, 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 this pull request may close these issues.

3 participants