Comments (7)
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.
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:
- open a terminal
- do
wsl shutdown
to make sure there isn't some lingering process - start docker desktop (which has the wsl integration and such)
- 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.
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.
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.
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.
Please provide an example project and steps to reproduce this so we can take a look
from vscode.
@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)
- Spamming window output
- it is always showing open launch.json
- Enable trust link in getting started walkthrough does not run the correct command
- Make the icons and texts in the Start container of Getting Started page vertically centered
- Terminal copilot initial hint should not show up for extension terminals
- Missing Menu Bar on VSCode for MacOS Sonoma 14.6.1
- context `"inlineChatFocused": true` remains after closing generate cell
- Inline chat looks heavy now when response text is little
- Option to create fresh Profile with no sign in
- Old FileSearchProvider session not properly cancelled HOT 1
- Connectivity issues?
- Multiple occurances of line number column and scroll bar HOT 1
- Support reverse search in tree find
- Allow setting Telemetry Output Logs to Trace always and independently HOT 6
- Allow commit characters to overwrite completion text in completion results. HOT 1
- Typing to reveal hidden notebook cell sometimes scrolls after reval
- notebook output is wrong HOT 2
- Using find, negated set with right parenthesis in regular expression does not seem to work HOT 1
- There is a big gap in the panel. Is this a bug? HOT 1
- The issue of autocompletion in the ROS workspace HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.