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

1.15.0 breaks "Python Refactor: Sort Imports" #9718

Closed
alancummings opened this issue Jul 8, 2021 · 6 comments
Closed

1.15.0 breaks "Python Refactor: Sort Imports" #9718

alancummings opened this issue Jul 8, 2021 · 6 comments
Labels
🤔 needs more info issues that require more info from the author vscode issues related to VSCode compatibility

Comments

@alancummings
Copy link

Bug Description:

When I try to run the "Python Refactor: Sort Imports" command, I get a pop-up window with the message "Please open a Python file to sort the imports."

  • The "Sort Imports" command worked in 1.14.0, and works again if I revert back to 1.14.0

Steps to Reproduce:

  1. Open a python (*.py) file
  2. Shift-Ctrl-p
  3. Select "Python Refactor: Sort Imports"
  • ms-python.python version 2020.10.332292344
  • built-in plugins at version 1.56.2
  • prerequisites for running "Sort Imports" are installed

Additional Information

  • Operating System: content of /etc/os-release:
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
  • Theia Version: 1.15.0
@vince-fugnitto vince-fugnitto added 🤔 needs more info issues that require more info from the author vscode issues related to VSCode compatibility labels Jul 9, 2021
@vince-fugnitto
Copy link
Member

@alancummings thank you for the discussion, did you notice any errors in the dev console or backend?
I tried with api-compatible version of the builtins and ms-python.python and the sorting of imports works correctly.

@alancummings
Copy link
Author

alancummings commented Jul 12, 2021

@alancummings thank you for the discussion, did you notice any errors in the dev console or backend?

There was no output at all associated with this particular issue in either the dev console or the backend output.

I tried with api-compatible version of the builtins and ms-python.python and the sorting of imports works correctly.

What is the best way to determine the api-compatible versions of the builtins and extensions? (Note: I've switched from explicit vscode-builtins-* entries in package.json to the single vscode-builtin-extensions entry in theiaPlugins -- this changes the versions from 1.56.2 to 1.50.0 for most of the plugins, but this issue did not change)

package.json.txt
I'm attaching my package.json.

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Jul 12, 2021

What is the best way to determine the api-compatible versions of the builtins and extensions?

As an application developer it would be your responsibility to select extensions bundled in your application (included in the package.json) which are api-compatible. For vscode-builtin-* extensions this means a version which is compatible with the api as they are built from vscode sources, while all other extensions must be compatible based on the engines.vscode version (example).

The framework currently supports:

export const VSCODE_DEFAULT_API_VERSION = '1.50.0';


I've tried with the extensions you referenced in your package.json and on master and it works correctly:

python-sort.mp4

You can try cleaning the application and rebuilding, making sure as well your yarn.lock file is properly updated, but I cannot reproduce the issue you reported with the steps provided.

@alancummings
Copy link
Author

@vince-fugnitto Thanks for the effort.

Is there a similar way to determine the best versions of yarn and node? The documentation (https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites) lists yarn 1.7, which seems pretty old (but maybe that is normal for the node world)

Feel free to close the issue.

@vince-fugnitto
Copy link
Member

@vince-fugnitto Thanks for the effort.

Is there a similar way to determine the best versions of yarn and node? The documentation (https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites) lists yarn 1.7, which seems pretty old (but maybe that is normal for the node world)

I believe newer versions are fine (I use 1.22.4). I do know that yarn 2.x.x (berry) is not yet supported #7062.

@vince-fugnitto
Copy link
Member

Feel free to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 needs more info issues that require more info from the author vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

2 participants