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

Initial implementation of quick-fix support for typescript #7261

Closed
wants to merge 2 commits into from

Conversation

kisstkondoros
Copy link
Contributor

@kisstkondoros kisstkondoros commented Jun 6, 2016

Code is heavily based on Atom-TypeScript's quick fix implementation
https://github.com/TypeStrong/atom-typescript/tree/master/lib/main/lang

It still needs a lot of work ...
image
image
image

@Tyriar
Copy link
Member

Tyriar commented Jun 7, 2016

I just created a feature request for one of these the other day #7073

@bpasero
Copy link
Member

bpasero commented Jun 9, 2016

👍 for a way to get imports resolved via quick fix.

@dbaeumer
Copy link
Member

dbaeumer commented Jun 10, 2016

@kisstkondoros thanks for the pull request. Although I like the features provided they don't fit architecturally how VS Code integrated with TypeScript. All TS smartness in VS Code is running in a separate process (the tsserver) maintained in this git repository (https://github.com/Microsoft/TypeScript).

Your pull request basically creates another compiler instance in the extension host, builds AST and resolves symbols. This doubles the memory consumption and in the worst case makes the extension host unresponsive which might impact other extensions. That is why all language smartness (even linters like eslint, tslint, ...) are run in a language server in its own process.

The best way to integrate quick fix into VS Code is to integrate it into the tsserver directly. VS Code basically consumes the tsserver as a binary. We don't own it and changes to the tsserver can't occur in the VS Code git repository.

Unless I don't miss anything I need to reject the PR and ask you to create a corresponding PR against the https://github.com/Microsoft/TypeScript repository.

@kisstkondoros
Copy link
Contributor Author

@dbaeumer
Hi, thanks for the detailed answer!

I thought this might be a temporary solution until microsoft/TypeScript#6943 is resolved. It is on the roadmap for TS 2.1 https://github.com/Microsoft/TypeScript/wiki/Roadmap#20

I'm a bit sad, but I understand the reasons behind.
I'll close the PR.

@dbaeumer
Copy link
Member

@kisstkondoros we should not wait until TS 2.1. I would like to encourage you to work on a PR against the TS server. I do the same if I need features in there and I volunteer to get you started if you want. However the final answer if the PR gets accepted depends on the TS team. So why don't you ask in microsoft/TypeScript#6943 if they would accept a PR?

@kisstkondoros
Copy link
Contributor Author

@dbaeumer I'll certainly check what can I do in TS core with the topic (after work) 😄

@kisstkondoros
Copy link
Contributor Author

@dbaeumer finally I've reached a state which can push this forward (I hope) and published it in the mentioned post. Thank you for the motivation!

@dbaeumer
Copy link
Member

@kisstkondoros great to hear that you are still working on this!

@WanderWang
Copy link

TypeScript team has finished it in TS2.1 right now , anything update ?

@dbaeumer
Copy link
Member

We started to look into adapting TS 2.1 for VS Code 1.8

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants