-
Notifications
You must be signed in to change notification settings - Fork 25
Upgrade to Typescript 1.4 #39
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
Comments
Actually, the TS version used is somewhere around 1.x (just need to change the reporting). That was roughly the last useable version before they rewrote their whole codebase (the new github variant of TS). 1.3 is indeed the first of those new TS versions that claims to support language services again, so I'm going to target that at some point - just haven't got round to it yet. There has never been any useful documentation - actually, TS 1.3 is the first time that they made their language services official. So it has always been: look at the sources, especially test harness and batch compiler, to figure out how the services are meant to be used, and all too often, new versions broke the API (as it was considered internal). Since this was a rewrite, I doubt a simple "compile and fix bugs/API changes" will do. Which is why I haven't allocated the time (yet). Of course, I do want the new features (mostly ES6 stuff, but some of the type system extensions are also interesting), so it is likely going to happen at some point;-) |
One good new is for TS1.4, the doc is available now (sadly not as useful as expectation, though): |
If you need help, contact me :) |
Just a quick update: |
+1 |
1 similar comment
👍 |
- builds and runs, with some commands working, some still missing; quick manual testing shows working: type,definition,references/occurences,completion,files - most tests fail at this point (often different details, not bugs) - depends on typescript v1.3-1985-g67476f1 (npm install locally, from github; despite the tag and package.json, that is a post-1.4.1 version)
- builds, runs, and the remaining test differences appear to be details (eg, more detailed type information, or changes in undocumented fields) - TODO: clean up code and documentation, accept new test results
As far as I can tell, the remaining test output differences in this second commit no longer indicate bugs, merely changes in details or undocumented fields. Have a look yourself. So I expect to accept the new test outputs, unless someone here finds any issues I missed. Remaining tasks: code and docs cleanup, then off to real-world testing, I hope. |
Pardon me, but how can I install it? |
@HerringtonDarkholme seems semver didn't like the '_'. I've also changed the typescript git dependency to something that works for me, but seems terribly wasteful (npm install clones the whole typescript repo). See also microsoft/TypeScript#1818. |
- accept test output - update README, up to vim part - fix 'completions' command (optional boolean) - drop some unused code - fill in 'structure' command by using getNavigationBarItems - bump version number
Hey. The LanguageService Object has a function called getEmitOutput. One could use the already parsed code tree to compile (hopefully) faster. This would need a new command for tss.js and the ability to configure the CompilerOptions via tss.js. (settings source maps, ecma target, ...). I've looked at the TypeScript source and at your changes and I think I could even implement it by myself, if you think this is a good idea and you do not want to do the work. What do you think? |
Since typescript now has an ES6 default target, and complains about external modules unless a --module option is set, configuration support (#44) had become urgent. tss now accepts the same commandline flags and tsconfig.json as tsc does (only the language service-related options have any effect). That means we depend on typescript 1.5 now (the current github version). I think this testing_ts1.4 branch is in good enough shape now that the plugin authors can and should start to give it a try (I'll start on the vim plugin next). If you've stuck to documented non-experimental features, you might not even have to change much at all... Once I've got the vim plugin going, and the typescript 1.5 package reaches the npm registry, I'll probably publish a new version, too. So, please file separate issues if you find more issues in testing. |
Still waiting for 1.5 to stabilize and to reach npm registry. Until then, any fixes/updates go into this branch. Plugin authors, note these changes in commands marked as experimental:
The former gives you a structural outline of a file (classes, interfaces, methods, ..), the latter can support generalized jump-to functionality (it interprets the item to jump to modulo case, prefix, substring, and even camelCase initial letters), so both should be interesting to your users. Both are now also supported in the Vim plugin as well as I could embed them using menus and commandline completion ( Support for these is still experimental, but I'd like to keep them around while they are in the LS API. |
And here I was thinking "yet another outdated ts plugin". Keep up the good work @clausreinke . I'll start testing the 1.4 branch right away |
I tried installing testing_ts1.4, but ran into an issue because the Microsoft/TypeScript repo is listed as a dependency using git+ssh protocol in package.json. Changed to just the git protocol and all worked. |
@jomifo yes, the github dependency is awkward (apparently, the kinds of bugs change with npm version, changes can result in needless and unnecessarily deep re-clones, and a final fix depends on some ongoing npm feature rewrite). Does
work for everyone (should leave |
git+ssh protocol for the TypeScript dependency worked fine for me. |
Worked for me |
The project still seems to reference Typescript 0.9.1.
Are there any plans to upgrade to Typescript 1.3? (Would be happy to help, but it looks like the TS API has changed quite a bit since 0.9.1, and wasn't clear to me which areas would need changing from looking at the code)
The text was updated successfully, but these errors were encountered: