Skip to content

Fix typedoc generation #14802 #14820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix typedoc generation #14802 #14820

wants to merge 1 commit into from

Conversation

jfaltermeier
Copy link
Contributor

@jfaltermeier jfaltermeier commented Feb 3, 2025

What it does

  • Revert to versions/script usage that were known to work
  • Re-add tsconfig that was removed during the yarn -> npm migration
  • increase memory

closes #14802

How to test

export NODE_OPTIONS="--max_old_space_size=15360"
npm install && npm run build && npm run docs

Check gh-pages/docs/next/index.html

Follow-ups

Currently, this pins typedoc to 0.25.13, the same version used before the yarn -> npm migration.

As far as I remember, this was necessary because typedoc-plugin-external-module-map stopped working with newer versions. We should check how updating to the latest version would be possible.

Additionally, we should look into reducing memory usage, as we're getting close to the GitHub runner's memory limit.

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

* Revert to versions/script usage that were known to work
* Re-add tsconfig that was removed during the yarn -> npm migration
* increase memory
@tsmaeder
Copy link
Contributor

I kind missed this one.

@@ -0,0 +1,253 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

This file used to be generated: https://github.com/eclipse-theia/theia/pull/14481/files#diff-21d974bacb2fdab12e4e74074940b9e74d897b70d163686bfbe5a7048f62d056. If we revive it, we need to revive the generation code, as well. However, I'm not sure treating the monorepo as a compilable artifact is proper. Is there another way we can configure what needs to be documented? How are the examples being filtered?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The examples are filtered here: https://github.com/eclipse-theia/theia/blob/master/configs/typedoc.json.

I didn't set up the TypeDoc generation initially, I just updated it to be compatible with a more recent TypeScript version, so I can't answer all details. But I think TypeDoc needs a tsconfig to locate included files and dependencies and to interpret the code correctly: https://typedoc.org/documents/Options.Configuration.html.

I'm not sure if there are other ways to configure this or if an alternative approach would be simpler than the previous solution.

Why was this generation removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Because we're no longer using it to compile the whole monorepo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

typedoc generation script does not work anymore
2 participants