eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
736 stars 65 forks source link

AST Node has no document #1717

Open grafandreas opened 6 days ago

grafandreas commented 6 days ago

When working on a new grammar / language, I see the issue that in Linking and other situations, Langium fails with

Error: AST node has no document. at getDocument (c:\Users\agraf.vscode\extensions\undefined_publisher.XXXXX-0.0.1\out\language\main.cjs:10601:11)

Since in @cdietrich 's report on the formatter he mentions "the" AST node has no document bug, I assume it is already known. Is there further information on that bug?

Regards,

Andreas

msujew commented 6 days ago

Hey @grafandreas,

can you post a reproduction example? I've seen some complaints about it, but failed to reproduce the issue as of now.

zrwsmd commented 5 days ago

image i have encounter similar issue by override getDocumentHighlight method in DefaultDocumentHighlightProvider