Skip to content

Cross File References #861

Answered by msujew
Danfs64 asked this question in Q&A
Jan 2, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey @Danfs64,

it looks like your CLI doesn't load your workspace, but only a single file. I believe the CLI that's auto-generated by the yeoman generator only ever works on a single file that it accepts via the -f argument. You will need to modify the CLI to load the whole workspace (or relevant files, like with ECMAScript-style imports). We do something similar in our own langium-cli, where we only have a single entry point and load all documents that are referenced in one document:

https://github.com/langium/langium/blob/cd5dc74ea1790bf7075e8c5d4f3607a6652b095e/packages/langium-cli/src/generate.ts#L63-L80

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@spoenemann
Comment options

@Danfs64
Comment options

Answer selected by Danfs64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants