-
Notifications
You must be signed in to change notification settings - Fork 81
Fix crashes caused by false assumptions about tsdoc output format #169
Conversation
It was assumed that "sources" exists in each item of "signatures", but this is not always the case. The fix is to look up "sources" recursively in parent nodes. It was also assumed that some node types have an "id", which isn't always true.
It would be really helpful to have a test to demonstrate this and ensure we don't break it in the future. Do you have a small piece of code that exhibits these |
@erikrose: I encountered this problem while producing documentation for a relatively small TS code base, but I'm not sure if I can pinpoint the exact cause of the failure. The file that seems to be the culprit is almost 900 lines, which I don't consider "small". I can send that file if you don't mind finding out the root cause yourself. I'm not familiar with the assumptions the sphinx-js code makes about the structure, so finding out what goes wrong would be hard to me. In fact, my "fix" can very well break something else. I just changed the code so that the problems went away. 😃 Now that I made changes to the aforementioned file I'm getting yet another crash. Do you have any insights on this:
Edit: hunted this one down. My class had a method called |
Hmm, I don't immediately see how the name of a method could make a difference. Are you saying that renaming it made the problem go away? The 'Value' object error means either our SuffixTree implementation is buggy, or our use of it is. If the former, I'm especially interested in fixing it. I'll gladly take your 900-line file! Do you want me to keep it a secret, or is it okay to attach to the ticket? |
I realized that it is not possible to run typedoc on a single file without its dependencies and I'm not able to ship the whole code base. I however attached the typedoc output file that failed to parse. |
Can you merge in from e16789f and see if that gets you past the Value error? I sat down and rewrote the suffix tree, hoping that will stem the steady trickle of issues like that one. |
I'm sorry, but we're shutting down this project. You could look at making these changes to sphinx-js-fork if they're not made already. Thank you! |
It was assumed that "sources" exists in each item of "signatures", but
this is not always the case. The fix is to look up "sources"
recursively in parent nodes.
It was also assumed that some node types have an "id", which isn't
always true.