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

[typescript] avoid activation on startup if there is no other activation event #6164

Merged
merged 1 commit into from
Sep 13, 2019

Conversation

AlexTugarev
Copy link
Contributor

Fixes #6163

How to test

  • start a workspace containing ts/js files and see the language service is working as usual
  • start a workspace without any ts/js files contained and see there is no tsserver running

Signed-off-by: Alex Tugarev alex.tugarev@typefox.io

@akosyakov
Copy link
Member

Should not we generally fix restart method? that it does not do anything if nothin is running?

@akosyakov akosyakov added languages issue related to languages typescript issues related to the typescript language labels Sep 11, 2019
@AlexTugarev
Copy link
Contributor Author

Should not we generally fix restart method? that it does not do anything if nothin is running?

really good question. is there a chance that activation might fail, but a second try would be successful? in that case, calling restart manually would stop working at all, no?

@akosyakov
Copy link
Member

akosyakov commented Sep 11, 2019

really good question. is there a chance that activation might fail, but a second try would be successful? in that case, calling restart manually would stop working at all, no?

restart is not available if the server is not running: https://github.com/theia-ide/theia/blob/732ef15589b668c456590276bebba9fcfa37f409/packages/languages/src/browser/languages-frontend-contribution.ts#L75-L82

I think it is safe to add a guard in restart method as well.

@AlexTugarev AlexTugarev force-pushed the GH-6163 branch 2 times, most recently from 4916bd2 to b725c1b Compare September 11, 2019 12:27
@AlexTugarev
Copy link
Contributor Author

@akosyakov I changed again and added the guard in restart method.

@akosyakov
Copy link
Member

@AlexTugarev check boxes are for reviewers or for you? :)

@AlexTugarev
Copy link
Contributor Author

@AlexTugarev check boxes are for reviewers or for you? :)

for reviewers ;-)

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested that ts support is there if a project contains tsconfig and is not there if not

@akosyakov
Copy link
Member

@AlexTugarev please rebase and if the ci is green please merge

…ion event

Fixes #6163

Signed-off-by: Alex Tugarev <alex.tugarev@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
languages issue related to languages typescript issues related to the typescript language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Activate TypeScript only if needed
2 participants