Skip to content
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

typedoc hangs indefinitely #1868

Closed
vince-fugnitto opened this issue Feb 10, 2022 · 2 comments
Closed

typedoc hangs indefinitely #1868

vince-fugnitto opened this issue Feb 10, 2022 · 2 comments
Labels
question Question about functionality

Comments

@vince-fugnitto
Copy link

Question

Since upgrading typedoc from 0.20.36 to 0.22.11 (in order to support typescript v4.5), we have encountered issues using typedoc where it will hang indefinitely during CI. I've ultimately tried to keep the same behavior from 0.20 when using 0.22 since it was known to work (eclipse-theia/theia@a552c06)

The process was manually cancelled (resulted in a generation over 2 hours):

Locally I have tried to add the plugin typedoc-plugin-missing-exports but it would ultimately result in an out of memory error (despite NODE_OPTIONS=--max-old-space-size=8192 being set).

Is there something that we are doing wrong, I'm not sure why typedoc would hang indefinitely without any clear error on how to proceed?

Reproduction Steps

If interested, you can run the generation locally on the repo (the repo is likely one of the more complex projects):

Additional Info:

@vince-fugnitto vince-fugnitto added the question Question about functionality label Feb 10, 2022
@Gerrit0 Gerrit0 added bug Functionality does not match expectation and removed bug Functionality does not match expectation labels Feb 12, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 12, 2022

I'm actually surprised TypeDoc manages to create all the programs... TypeDoc is creating 53 instances of the compiler concurrently in order to create a single documentation site....

Turning on --logLevel Verbose provides some insight:

Debug: Converting with 50 programs 2725 entry points

When running locally with NODE_OPTIONS set to bump up available memory, I still run out of memory. I put some more logging in:

There are 149247 reflections in the project
There are 6182 pages to render

... that's a lot of pages. This led me to suspect that your exclude settings weren't being applied in the same way. The resulting investigation eventually led to adding two lines to the release notes for 0.22.0.

  • Paths in config files will now be resolved relative to the config file instead of relative to the current working directory.
  • Exclude patterns are now checked against files instead of against each part of the path as traversed, Inclusion pattern doesn't work #1399.
    This means that an exclude of **/someDir will not exclude files in that directory. To exclude files in a directory, specify **/someDir/**.

I've submitted a pull request with the appropriate changes to fix this in your project: eclipse-theia/theia#10743

@vince-fugnitto
Copy link
Author

Thank you for taking the time to help out and identify the issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants