You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(client,server): Correctly use bundled version unless tsdk is specified (#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).
0 commit comments