asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
341 stars 97 forks source link

Test "Antora support with single documentation component" is flaky #856

Open ViToni opened 8 months ago

ViToni commented 8 months ago

Hit the issue only once locally and once in a pipeline but still unexpected:

I've seen the test also fail in a Windows pipeline (not master, feature branch with unrelated changes):

System Info Commit: acbb89000276bc1541b2c66385009f59645b3d60 Date: 2024-03-17T19:45+01:00 Node.js: 18.14.2 OS: MacOS Sonoma 14.4

ggrossetie commented 8 months ago

The following function returns undefined: https://github.com/asciidoctor/asciidoctor-vscode/blob/2235846a3708171e01a3076e354292c6a6d835e1/src/features/antora/antoraSupport.ts#L266

Since there's no error in the console, antoraSupportManager.isEnabled() might return false:

https://github.com/asciidoctor/asciidoctor-vscode/blob/2235846a3708171e01a3076e354292c6a6d835e1/src/features/antora/antoraSupport.ts#L268-L270

Or we cannot find an Antora context for the given file: https://github.com/asciidoctor/asciidoctor-vscode/blob/2235846a3708171e01a3076e354292c6a6d835e1/src/features/antora/antoraSupport.ts#L313-L315

We should probably add a logger to help troubleshoot.