Refrain creating ember-loose virtual code in non ember-loose environment#851
Conversation
| ]); | ||
| }); | ||
|
|
||
| test.only('gives diagnostics for TypeScript file', async () => { |
There was a problem hiding this comment.
This .only() needs to be removed so that other tests run. Normally vitest catches this on CI but these VSCode tests I think use mocha or something that doesn't catch cases like these.
There was a problem hiding this comment.
Bah. I missed this :(
|
Nice, I can see some perf gains here; I wanted to guard for this originally but with some of the trickiness in TS Plugin's synchronous API it wasn't clear that we'd be able to synchronously determine the presence of |
|
FWIW I think there might be further potential perf gains here, because even with your PR, apps with Part of the reason I did it this way was 1. just to get something working and 2. based on angular-webstorm's experience. With angular (pardon me bc I could be getting something wrong), a .ts file is considered a component once the That said angular-webstorm might have additional perf checks to do a light-weight parse within the VirtualCode if no In our case, perhaps it's feasible to check whether a .ts file has |
|
In v2 addons they can be anywhere. But default paths are /components/ Its worth the perf. Maybe we can add an option to add more component paths in TSconfig if needed |
|
Summarizing some of our discussions in DM: The only potential downside/uncovered case by this perf improvement would be that we can't support the use case of v2 addons that still use loose mode components AND their components don't have a |
I didn’t find a great place to test this, so ended up adding to the vscode test suite. Any better suggestions are very welcome.
Closes #846