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

Resolve interpreter correctly for non-PyCharm IDEs #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

InSyncWithFoo
Copy link
Owner

Presumably fixes #41. Not tested.

@InSyncWithFoo InSyncWithFoo added the help wanted Extra attention is needed label May 12, 2024
Copy link

Qodana Community for JVM

1 new problem were found

Inspection name Severity Problems
Unused symbol 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2024.1.4
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@bzoracler
Copy link

I've tested the following IDEs on Windows (latest stable versions unless otherwise indicated):

  • CLion - works
  • IntelliJ Ultimate - works
  • RustRover 2024.1 EAP - works
  • Rider - works

The results all look like this:

>>> from collections.abc import Callable
>>>
>>> v: Callable[[int], bool] = 1
                               ^
Pyright: Expression of type "Literal[1]" is incompatible with declared type "(int) -> bool"
   Type "Literal[1]" is incompatible with type "(int) -> bool" (reportAssignmentType)

@InSyncWithFoo
Copy link
Owner Author

@bzoracler Thanks a lot! That saved me an unimaginably vast amount of work.

Could you show me the corresponding log entries? If that's something you don't want to show publicly, you could redact private parts and/or send me an email at <this account's name>@gmail.com.

@InSyncWithFoo
Copy link
Owner Author

After hours of debugging I conclude that a null interpreter is not the cause of what I saw in #41.

Painfully, that means I have two problems, one here and one has yet to be discovered.

@bzoracler
Copy link

I've sent over a log file from a CLion session - hopefully that helps.

@InSyncWithFoo
Copy link
Owner Author

@bzoracler Thanks, but the file doesn't contain any LSP log entries, which would look something like this:

#c.i.p.l.i.c.Lsp4jServerConnector - --> PyrightLSDescriptor@project: {"jsonrpc":"2.0", ...}
#c.i.p.l.i.c.Lsp4jServerConnector - <-- PyrightLSDescriptor@project: {"jsonrpc":"2.0", ...}

Perhaps you forgot to enable logging?

Specifically, what I want to look at the most is the didChangeConfiguration request as sent by Listener on server initialization. If the interpreter is not passed correctly, the JSON data will have no params.settings.python.pythonPath property, as shown here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project interpreter is not resolved correctly on CLion
2 participants