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 formatter converts everything to spaces #58518

Closed
joaomoreno opened this issue Sep 12, 2018 · 7 comments
Closed

TypeScript formatter converts everything to spaces #58518

joaomoreno opened this issue Sep 12, 2018 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority typescript Typescript support issues verified Verification succeeded

Comments

@joaomoreno
Copy link
Member

joaomoreno commented Sep 12, 2018

Happens in selfhost. This has happened 3 times to me today, need to use git to revert the file.

Can't get reliable repro steps.

cc @bpasero

@bpasero
Copy link
Member

bpasero commented Sep 12, 2018

Happened to me as well already last week. Only way out was to "Convert spaces to tabs" command.

@DanTup
Copy link
Contributor

DanTup commented Sep 17, 2018

I'm seeing this too (Insiders) - running Convert to tabs fixes it, but as soon as I format-on-save it goes back to Spaces. The settings in the status bar are set correct (tab size: 4).

@DanTup
Copy link
Contributor

DanTup commented Sep 17, 2018

Ugh, I've just started seeing this on Stable too :(

@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Sep 17, 2018
@joaomoreno joaomoreno added important Issue identified as high-priority typescript Typescript support issues labels Sep 19, 2018
@joaomoreno joaomoreno added this to the September 2018 milestone Sep 19, 2018
@joaomoreno
Copy link
Member Author

Happens very very often.

@mjbvz
Copy link
Contributor

mjbvz commented Sep 21, 2018

@joaomoreno Please:

  1. Set "typescript.tsserver.trace": "verbose"
  2. When this issue first happens in a session, open the output panel and share the typescript output

@joaomoreno
Copy link
Member Author

joaomoreno commented Sep 24, 2018

@mjbvz Just managed to get repro steps, seems to be related to save participants before the TS language service is ready:

  1. Enable format on save
  2. Open a TS file in vscode
  3. Reload
  4. Press Ctrl S every 0.5 seconds until it happens.

Recorded a verbose log and stopped as soon as it happened: https://gist.github.com/joaomoreno/8cd7fe72097d40197e86cd342278e4ba

@mjbvz
Copy link
Contributor

mjbvz commented Sep 24, 2018

Thanks @joaomoreno! I believe I have narrowed down the root cause and submitted a fix. Let me know if you see this again the next insiders build.

@joaomoreno joaomoreno added the verified Verification succeeded label Sep 28, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants