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

Organize imports and formatting cause lines to be deleted #10923

Closed
luabud opened this issue Apr 2, 2020 · 2 comments
Closed

Organize imports and formatting cause lines to be deleted #10923

luabud opened this issue Apr 2, 2020 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@luabud
Copy link
Member

luabud commented Apr 2, 2020

from @Spenhouet in microsoft/vscode#83586:

I can very much still reproduce this. I just used the settings.json from above:

{
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.organizeImports": true
  }
}

and opened a random python file. Directly on the first one it dances and deletes lines of code.

import datetime
import subprocess
import sys
from operator import attrgetter
from pathlib import Path
from typing import Any, List, Optional, Tuple

I extracted these lines of code into an empty python file ans pressed STRG + S multiple times (nothing else):

race_condition

@Spenhouet if could add a comment here in this issue providing the information following the template below, it'd help us investigate the issue you're experiencing.

Environment data

  • VS Code version: XXX
  • Extension version (available under the Extensions sidebar): XXX
  • OS and version: XXX
  • Python version (& distribution if applicable, e.g. Anaconda): XXX
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): XXX
  • Relevant/affected Python packages and their versions: XXX
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): XXX
  • Value of the python.languageServer setting: XXX

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

XXX
@luabud luabud added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Apr 2, 2020
@Spenhouet
Copy link

Spenhouet commented Apr 2, 2020

@luabud I'm sorry, I did read my e-mail notification, got frustrated that the issue is closed even though I'm still having trouble with this and then mixed things up.

You can close this issue since it is already reported in the above mentioned issue.

@luabud
Copy link
Member Author

luabud commented Apr 2, 2020

@Spenhouet thank you for the update 😊 I'm still a bit confused as to why lines are being deleted though, as I can't repro it. But I'll subscribe to microsoft/vscode#90220. Thank you!

@luabud luabud closed this as completed Apr 2, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 2, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
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
Projects
None yet
Development

No branches or pull requests

2 participants