Skip to content

Fix error in extension.test.ts #1134

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

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

matthewbastien
Copy link
Member

@matthewbastien matthewbastien commented Oct 10, 2024

VS Code recently updated its built-in TypeScript Language Server to v5.6.2 which shows an error in extension.test.ts that is not present in CI (currently this repo uses TypeScript 5.5.2). However, this is a legitimate issue as the rootWorkspaceFolder variable can indeed be undefined.

I've simply fixed up the code in this area to properly handle the fact that the variable can be undefined as well as an issue where a throw would not have been handled properly. However, I'm hesitant to jump to TypeScript 5.6.2 since TypeScript ESLint currently does not support 5.6.

@award999
Copy link
Contributor

award999 commented Oct 10, 2024

ESLint currently does not support 5.6.

we should raise a bug for this, the fact we don't get tsc errors when building we cannot let stay. Need to watch for ESLint release so we can upgrade here. Can we temporarily downgrade typescript?

@matthewbastien
Copy link
Member Author

we should raise a bug for this, the fact we don't get tsc errors when building we cannot let stay.

I can raise an issue for this and point it at the relevant issue from TypeScript ESLint.

Can we temporarily downgrade typescript?

Our version of TypeScript right now is fine. I just don't want to upgrade us to 5.6.2. This PR also tells VS Code to use the version of TypeScript in node_modules. So, there at least won't be any discrepancies in errors anymore.

@matthewbastien matthewbastien merged commit 8d3618a into swiftlang:main Oct 10, 2024
8 checks passed
@matthewbastien matthewbastien deleted the fix-extension-test branch October 10, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants