Skip to content

using --includeDeclarations when there are no .d.ts declaration files causes typedoc to silently hang forever #919

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

Closed
9oelM opened this issue Dec 16, 2018 · 1 comment

Comments

@9oelM
Copy link
Contributor

9oelM commented Dec 16, 2018

The problem

Yes I have looked at #913 and the comment by @aciccarello also. But I still find that --includeDeclarations option would make typedoc hang like forever without any warnings if there are no d.ts declaration files.

Context

I was planning to add d.ts files later on but I did not want to edit typedoc config later too, so I just added includeDeclarations option to the config (typedoc.js). But the problem was typedoc would hang somewhere in its process, probably looking for .d.ts files.

I tested this problem each time with the option specified on cli (by specifying --includeDeclarations) and in typedoc.js in rootdir.

Reproducing the problem

You can test directly from c9.io here:
(on c9 cli)

typedoc --out docs test.ts

or git clone this repo to test it out:

git clone https://github.com/9oelM/typedoc-test.git
cd typedoc-test
npm install
typedoc --out docs test.ts

this is going to show something like

Using TypeScript 3.1.6 from /home/ubuntu/workspace/node_modules/typedoc/node_modules/typescript/lib

and hang forever.

This is the content of the config file used:
typedoc.js

module.exports = {
  module: "commonjs",
  mode: "modules",
  target: "es5",
  out: "docs/",
  name: "justTesting",
  exclude: ["node_modules/**", "**/"],
  includeDeclarations: true,
}

I waited for several minutes but it won't work. It is even clearer that includeDeclarations option is the problem when you test it out without it (just exclude the last line from the above config):

$ typedoc --out docs test.ts 

Using TypeScript 3.1.6 from /home/ubuntu/workspace/node_modules/typedoc/node_modules/typescript/lib
Rendering [========================================] 100%

Documentation generated at /home/ubuntu/workspace/docs

It would work without includeDeclarations specified.

So..

I just hope there would be some kind of safety measures in case users put includeDeclarations option in advance of creating d.ts files, or by any other ignorance because it is typedoc is going to hang forever and not going to tell you the problem!

@9oelM 9oelM changed the title using --includeDeclarations when there is no .d.ts declaration files causes typedoc to silently hang using --includeDeclarations when there are no .d.ts declaration files causes typedoc to silently hang forever Dec 16, 2018
@aciccarello
Copy link
Collaborator

Thanks for the detailed report, I've merged this with #913

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

No branches or pull requests

2 participants