-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client,server): Correctly use bundled version unless tsdk is spec…
…ified (#1970) * refactor(client): Move server options to client class This means not having to pass context around and will also give those functions access to other things directly like outputChannel for logging. * refactor(client): Log warning to the output channel for when block syntax is disabled We should log this somewhere or there would be no way to know when this happened to a user. * refactor(client): Inline server options rather than helper function A function with a flag is frequently a code smell and in this case it is. There isn't much code shared between the two modes so inlining is better. * fix(client,server): Correctly use bundled version unless tsdk is specified When the `typescript.tsdk` is empty, it should be ignored. Instead, the logic previously would _always_ add an empty string tsdk to the beginning of the probe locations. This would result in resolving the ts server from the user's node modules rather than prefering the bundled version as intended unless a different tsdk is specifically set in the config. Additionally, if the workspace has many roots, the first one would be seen as a tsdk. While this would probably still result in the correct behavior, the code is much easier to follow when the tsdk is a separate option passed to the server. * refactor(server): Update tsserver version log to reflect actual version used The version that's currently logged is whatever the resolve logic gives. However, this resolve logic actually only affects the version when the banner is used to override the require statement. This won't happen when debugging the extension and stumped me for quite some time since the log version was using the tsdk I specified but I was not seeing the behavior I expected with that version (I was instead seeing the behavior expected from the bundled version). (cherry picked from commit 984ecf6)
- Loading branch information
Showing
6 changed files
with
105 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters