Git Product home page Git Product logo

Comments (7)

dkamins avatar dkamins commented on September 28, 2024 1

A 2024 VS Code regression with @aliased imports no longer updating on file moves has been identified and may be relevant if you are landing on this page. There is a short-term workaround, but your feedback and comments are essential to getting this escalated properly for a real fix.

For background, root cause, why it's complicated, related issues, workaround, and next steps, see the full analysis of the regression here:

Join the discussion there and let's get this resolved!

from vscode.

runfaj avatar runfaj commented on September 28, 2024

Today was one of the days where this actually booted up correctly, so I think I have some more info that might help debug this!

I started my computer normally and it definitely chalks up to a timing issue somewhere, I'm thinking between docker and wsl and vscode working together. My startup process is always the same steps:

  1. open a terminal
  2. do wsl shutdown to make sure there isn't some lingering process
  3. start docker desktop (which has the wsl integration and such)
  4. start vscode

The times where this seems to work, I've noticed a couple things happen:

  • my terminal pnpm commands seem to map into the docker instance from vscode. So instead of having to do something like a pnpm install inside docker, the pnpm install automatically scopes to docker
  • my husky commands that need to run inside docker work just fine in the vscode source control panel when doing a commit
  • all the imports and such that are an issue in the description work correctly

When it doesn't work, the above all fail and I have to manually run all commands in a docker context. So it seems like there's some timing issue where vscode doesn't initialize the order between wsl, docker, and other vscode setups in the correct order every time. This then seems to cause something like the typescript imports to fail with aliasing issues or something (given the error log shown above).

Is there some way to a) see the initialization flow for the entirety of vscode as a whole, and b) force it to always initialize in the same correct order each time?

EDIT: I might be mistaken on the above comment, but it seems related. After working through today, I had some lulls between meetings where I wasn't actively touching vscode at all for an hour or so at a time. And...now we're back to all the import stuff broken again. So just not touching it at all just broke it 😞

from vscode.

runfaj avatar runfaj commented on September 28, 2024

After further testing, it seems that something internally broke with vscode where it isn't connecting the dots anymore unless the project is fully built. Previously, everything would work based on files in the project, but as I've been working, I've noticed connections do work right after a full build. I have a pnpm workspace where each package is its own thing with its own modules. If I build all packages, then links do appear correctly. However, if any file is modified/added between that build, then only things in the previous build are found. As soon as something is not found, it seems to more or less crash the ts server in the fact that references just stop working (even though the server might still be running behind the scenes).

from vscode.

runfaj avatar runfaj commented on September 28, 2024

I really don't know what in the world to do here. I've all but completely reset vscode down to the bare essentials and it still seems to crash on all the imports. It is incredibly frustrating, especially if I have to manually type import paths across dozens of files when adding/updating some feature in a project.

I've also attempted on the latest TS version. At this point, when some issue happens, now it seems to even be crashing the tsserver completely somewhat. The options to restart the ts server in the vscode command menu completely disappear and everything.

Any debugging help would be appreciated. @mjbvz any suggestions?

from vscode.

runfaj avatar runfaj commented on September 28, 2024

Additional update: it seems that upgrading to TS 5.5 fixed import suggestions during typing partially. Sometimes things are not found still, but other times they are. However, the quick fix popup is still entirely broken and never shows any suggestions. The logged ts error remains the same as the description.

from vscode.

mjbvz avatar mjbvz commented on September 28, 2024

Please provide an example project and steps to reproduce this so we can take a look

from vscode.

runfaj avatar runfaj commented on September 28, 2024

@mjbvz I've tried to reproduce this on 2 different machines from the one that has the issue and I haven't been able to unfortunately. It seems to be something in conjunction with docker, wsl, vscode, and typescript altogether and possibly not loading in the correct order somewhere. I'd be happy to give a reproducible example, but I haven't been able to get anything other than the current machine with the provided error log. Is there anything in addition to the description/comments above I can help provide to at least potentially narrow things down?

from vscode.

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.