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 incompatible with typescript 1.1 #38

Closed
stolfgang opened this issue Oct 10, 2014 · 21 comments
Closed

Typedoc incompatible with typescript 1.1 #38

stolfgang opened this issue Oct 10, 2014 · 21 comments
Labels
help wanted Contributions are especially encouraged

Comments

@stolfgang
Copy link

unfortunately typedoc does not run with typescript 1.1.0, which was relaesed a few days ago. Currently you only get the following message:

Could not find ´typescript.js´. Please install typescript, e.g. 'npm install typescript'

@sebastian-lenz sebastian-lenz added bug Functionality does not match expectation and removed bug Functionality does not match expectation labels Oct 10, 2014
@sebastian-lenz
Copy link
Member

TypeScript 1.1 has a completely new compiler and is therefore incompatible with TypeDoc. I've updated the dependencies so only TypeScript 1.0.x is supported now.

@sebastian-lenz sebastian-lenz added the help wanted Contributions are especially encouraged label Oct 22, 2014
@sebastian-lenz
Copy link
Member

Okay, the new compiler is really powerful and fast. But it's not easy to adept TypeDoc to the new compiler as the pull declarations we rely on are gone. Sadly TypeScript again comes pretty undocumented (Microsoft should start using TypeDoc... Well I guess they have a documented version of the source files).

I've browsed through the source files and there is a tree of "nodes" that looks like the replacement for the pull declarations. But they seem to be in a less processed state than the declarations. Again there are "symbols" flying around but they are not as easy to traverse as the nodes.

If anyone has more details about the compiler internals I would be glad to hear from you.

@scriby
Copy link

scriby commented Nov 5, 2014

+1

@kamranayub
Copy link
Contributor

Man, I was getting so excited to use TypeDoc until I saw this issue. I wish I knew anything about the compiler :( We're using YUIDoc so far but it sucks... so much repetition. I wish the TS compiler would just output JSON so you can parse it to generate docs.

@markvandenbrink
Copy link
Contributor

TypeDoc is really cool!!! But the new TypeScript compiler is very fast... To use both in one project we've ended up creating a separate project for TypeDoc with a local version of the old 1.0.x compiler. Maybe it is a short term solution to embed the 1.0.x compiler depedency within the TypeDoc module? I don't know if that is something which can be easily done, but it would make it possible to have the newest compiler globally installed while TypeDoc uses the old version... Sort of interim solution.

@scriby
Copy link

scriby commented Nov 13, 2014

Is this approach going to work with 1.3, which includes new syntax? Won't the 1.0 compiler fail to parse it?

@sebastian-lenz
Copy link
Member

As far as I know TypeScript 1.1 contains no new language features, version 1.1 solely introduces the new compiler infrastructure. Starting with TypeScript 1.2 new features will be included and therefore TypeDoc using compiler v1.0 will be incompatible. I've changed the node dependencies so using TypeDoc right now should work.

I've started the development of TypeDoc 0.2 which will utilize the new compiler infrastructure. As I mentioned above, this is a big makeover and it will probably need some time to finish development. I'll keep you updated.

@kamranayub
Copy link
Contributor

That would be so awesome @sebastian-lenz, I took a look at the source for TS 1.3 (just released yesterday) and couldn't make heads or tails of it... but again, I've never worked on a compiler.

@markvandenbrink
Copy link
Contributor

Thank you @sebastian-lenz for all your hard work! I've read the following phrase on the TypeScript roadmap page:

"Our next release will be TypeScript 1.3 and will include a newly rewritten language service to enable a smoother, faster TypeScript development experience in editors. This also marks the first release where we will begin standardizing the API of the compiler so that tools can depend on it."

Hopefully version 1.3 with it's new API and language service can help you to create a more durable version of TypeDoc...

@scriby
Copy link

scriby commented Nov 14, 2014

FYI 1.3 is out

@bluong
Copy link

bluong commented Jan 13, 2015

Is there development being made on having typedoc being compatible with TS1.3? We were using typedoc and then after upgrading to 1.3, we realized that there wasn't compatibility for the upgrade.

@sebastian-lenz
Copy link
Member

Sorry for the very, very long delay, I've been pretty busy lately. Yes, there is definitely a lot of work going on in the background to make TypeDoc compatible with TypeScript 1.3. You can see and try the current status in the branch v0.2.

In version 0.2 the complete process of extracting data from the TypeScript compiler has been rewritten. TypeDoc 0.2 is fully compatible with TypeScript 1.3 and supports new features like the protected keyword and tuple types. Also the generic support has been greatly improved, generic parameters show up in the documentation, can be documented and will be resolved correctly when e.g. subclasses implement a generic class. And, last but not least, the documentation generation is a lot faster now thanks to the improved compiler speed.

However, this version is not finished yet. There are still several issues regarding the template rendering that have to be resolved. But we are near a beta release.

@bluong
Copy link

bluong commented Jan 14, 2015

Do you have an estimate of when the release is?

@sebastian-lenz
Copy link
Member

I can't promise anything, I hope to release a beta version this month on NPM.

Feel free to try the current development version:

@bluong
Copy link

bluong commented Jan 14, 2015

I believe I tried the above and right now I'm running into an error module.js:340
throw err;
^
Error: Cannot find module 'progress'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at td (/Users/bluong/git/typedoc/bin/typedoc.js:19:22)
at Object. (/Users/bluong/git/typedoc/bin/typedoc.js:33:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

@sebastian-lenz
Copy link
Member

That's basically a good sign, "progress" is a new dependency of v0.2. It's correctly listed in the module info file. Did you install the dependencies of TypeDoc? There should be a folder "progress" in node_modules after that.

@bluong
Copy link

bluong commented Jan 14, 2015

Yeah, I got the documentation to run now, however I'm now getting files like

docs/modules/directoryInfo.file.html

instead of what it was before with

docs/modules/file.html

@sebastian-lenz
Copy link
Member

Microsoft has released TypeScript 1.4 with cool new features and TypeDoc still sticks to v1.0, that's annoying. Although I'm not feeling super happy with this decision, I've just published version 0.2 of TypeDoc on NPM which is at least compatible with TypeScript 1.3.

@kamranayub
Copy link
Contributor

Awesome work, this means we can start to adopt it for our project!

@sebastian-lenz
Copy link
Member

TypeDoc 0.2.2 is now on NPM which is compatible with TypeScript 1.4.

@markvandenbrink
Copy link
Contributor

Great news TypeDoc is now compatible with the latest TypeScript release. Thanks for all the hard work! Documentation generated by TypeDoc is beautiful and clear. Really like it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

6 participants