Open Bug 1930704 Opened 6 days ago Updated 5 days ago

Mermaid diagram with empty classes fails to build in source docs but works on mermaid.live

Categories

(Developer Infrastructure :: Source Documentation, defect)

defect

Tracking

(firefox134 affected)

REOPENED
134 Branch
Tracking Status
firefox134 --- affected

People

(Reporter: pbz, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I'm trying to add the following Mermaid diagram to source docs: https://gist.github.com/Trikolon/a7d0c4e5f32d92398efa757311153c4d

This diagram works just fine on mermaid.live, but it leads to a build error when I add it to the source docs: Syntax error in text.

Could the issue be that our mermaidjs version is outdated? Our version is currently 10.2.0 while the latest version is 11.4.0.

Assignee: nobody → sledru
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3dae861bca6e doc: update to mermaid 1.0.0 r=firefox-source-docs-reviewers,ahal DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch

Thanks for the update!

Unfortunately the issue persists. The error message is: "Syntax error in text mermaid version 11.2.0".
I've tested locally with Mermaid CLI based on mermaid version 11.2.0 which builds the diagram successfully. Not sure what's going on here.

Is there a way to enable verbose / error logging for mermaid when I run the mach doc command? With mach doc --verbose I only see the dependencies being loaded, but no mermaid build errors.

Status: RESOLVED → REOPENED
Flags: needinfo?(sledru)
Resolution: FIXED → ---

I think you should report a bug on sphinx-mermaid
Doesn't seem that it is our fault

Flags: needinfo?(sledru)

I'm not sure where the bug is exactly. It could be in our dependency. One would have to setup a sphinx environment and try.
I've at least figured out what is causing the build failure. Our doc system does not seem to like empty classes (without any members). Adding some dummy attributes like here fixes the build error: https://gist.github.com/Trikolon/8845701f398b93b67e0cbf8fd623ad3b#file-gistfile1-txt-L25

Summary: Mermaid diagram fails to build in source docs but works on mermaid.live → Mermaid diagram with empty classes fails to build in source docs but works on mermaid.live

maybe we have some post processing / reformatting removing the tags?!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: