Giter VIP home page Giter VIP logo

Comments (7)

rchiodo avatar rchiodo commented on June 9, 2024 1

Yes it does. I have to do this first though:

  1. Open VS code
  2. Open the codeActions.py file
  3. Put the cursor in the os line
  4. Close codeActions.py file
  5. Reload VS code
  6. Open codeActions.py file
  7. Try quick fix

No matter how long I wait, it shows this:
image

If I move the cursor it works again.

My guess is that VS code isn't reasking. It must be asking as we're still loading the index information.

from pylance-release.

heejaechang avatar heejaechang commented on June 9, 2024

this happens regardless how long you waited before doing the first code action?

from pylance-release.

rchiodo avatar rchiodo commented on June 9, 2024

Let me try again to make sure, but I believe so.

from pylance-release.

heejaechang avatar heejaechang commented on June 9, 2024

my guess is the first code action request came before indexing is done, so we returned code action response without import os and that response is cached until new trigger such as caret move or text change or etc. so, control+. won't show import os until that happen.

I guess we could trigger whatever that would trigger new code action request when indexing is done (if such thing exists like semantic refresh or etc)

from pylance-release.

heejaechang avatar heejaechang commented on June 9, 2024

hmmm.. it doesn't repro for me somehow in WSL. if you enable logLeve: Trace and do ctrl+. after index is done log, is it still happening? it might not happening to me since I don't have much packages installed so indexing is relatively cheap.

from pylance-release.

rchiodo avatar rchiodo commented on June 9, 2024

CTRL+. seems to work. It's just the quick action lightbulb that has the wrong data. And if I do CTRL+. and then click on the lightbulb, the lightbulb then has the correct data.

from pylance-release.

heejaechang avatar heejaechang commented on June 9, 2024

I see. then ctrl+. must doing new code action request but existing lightbulb is using cached info.

just looked through LSP spec on code action -https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction - but couldn't find any refresh or similar request. looks like when to refresh code action info seems baked in the code itself.

we might want to ask LSP to add something like this - https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#semanticTokens_refreshRequest - for code actions?

from pylance-release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.