Skip to content

fix: CI failure on main#691

Open
jrentlez wants to merge 5 commits intomainfrom
docusaurus-ci
Open

fix: CI failure on main#691
jrentlez wants to merge 5 commits intomainfrom
docusaurus-ci

Conversation

@jrentlez
Copy link
Contributor

@jrentlez jrentlez commented Mar 5, 2026

This PR fixes the CI failure on main.

The fundamental problem is that SheetRow does not override getUserDoc(), which causes nx run docs-generator:start to fail. This is only noticeable in the CI, because existing repos have a left-over builtin-value-types.md in the source tree, which is used by nx build docs instead.

However, while working on this I discovered another issue:
nx run docs-generator:start stops before ever getting to the above failure, without any error log or error code. The exact stop location is very inconsistent. Unfortunately, I got on the wrong track here and spent quite some time looking into langium and chevrotain source code, to try and figure out where exactly this crash originates.
Long story short, this happens because nx stops the underlying node process after a timeout, attempts to restart it, and then continues execution without any hint to the user.

See the commit messages for more details.

I decided to fix both issues in one PR, because fixing only one issue would leave code we know to be erroneous in main.

jrentlez added 5 commits March 5, 2026 09:25
Problem: `npm run build` generates lots of artifacts, many of them inside the
source tree, but currently there is no way to remove them.

Solution: add an npm script that clears the nx cache and removes generates
files.
Problem: If there is an error during document generation, the error is printed,
but document generation continues, failing later in the pipeline.

Solution: Throw the error, making node exit with a non-zero error code, making
nx abort the pipeline with a failure at the right location
Problem: For some reason, the `@nx/js:node` SILENTLY ABORTS the exectution after
a timeout, WHITHOUT an error code. See
https://github.com/nrwl/nx/blob/4377c8b00d2343058f7d4ebd572d18b559682b43/packages/js/src/executors/node/node.impl.ts#L109-L132

Solution: Use the `nx:run-commands` executor instead
…amles

Problem: The docs-generator uses an (outdated) example for all referencable valuetypes.

Solution: Get the example from an overridable valuetype method and update the
default
Problem: Document generation crashes because `SheetRow` does not provide
required documentation

Solution: Override the required method and provide a custom example

The previous commits make sure the pipeline actually crashes at the correct
location, instead of failing silently or too late.
This commit actually fixes the pipeline
@jrentlez jrentlez self-assigned this Mar 5, 2026
@jrentlez jrentlez added bug Something isn't working documentation Improvements or additions to documentation labels Mar 5, 2026
@jrentlez jrentlez requested a review from georg-schwarz March 5, 2026 09:23
Copy link
Member

@georg-schwarz georg-schwarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nicely done!

"start": {
"executor": "@nx/js:node",
"dependsOn": ["generate-language-server"],
"executor": "nx:run-commands",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a comment here and say that this did not work with @nx/js:node and link the PR?

Comment on lines +47 to +66
valuetype TableSchema {
tableColumn: ${name};
}
transfrom tableRowParser {
from r oftype SheetRow;
to tableRow oftye TableSchema;

tableRow: {
tableColumn: as${capitalizedName} (r . "tableColumn");
};
}
block ExampleTableInterpreter oftype TableInterpreter {
header: true;
columns: TableSchema;
parseWith: tableRowParser;
}`.trim(),
description:
`A block of type \`TableInterpreter\` that interprets data in the column "columnName" as \`${name}\`.
`.trim(),
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be cool to have a real example / close to a real use-case and not a dummy one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants