Repository navigation
Description
Question
How should the TS version work in multi root workspaces?
You can currently select between the workspace version of TS or from the bundled / global version. In the multiroot world, we plan on only starting a single TSserver instance but what version options should be shown in these cases
Startup Scenarios
-
Two+ workspaces with no tsdk settings
Proposed Version Suggestions:
- Bundled TS version -
Two+ workspaces with user tsdk settings that points to an absolute path
Proposed Version Suggestions:
- TS at the absolute path from the tsdk -
Two+ workspaces with user tsdk settings that points to a relative path
Proposed Version Suggestions:
- For each workspace, check if the tsdk can be resolved relative to the workspace. Include in suggestions if it does. Filter out duplicate TS versions. Pick first as default. -
Two+ workspaces where one has a tsdk setting in the workspace settings
Proposed Version Suggestions:
- Bundled TS version (default)
- Version from tsdk from the workspace -
Two+ workspaces where multiple workspaces have tsdk settings in their workspace settings
Proposed Version Suggestions:
- Bundled TS version (default)
- For each workspace, check if the tsdk can be resolved relative to that workspace. Include in suggestions if it does. Filter out duplicate TS versions -
Two+ workspaces where one or more workspaces have tsdk settings in their workspace settings and the user has an absolute path tsdk setting
Proposed Version Suggestions:
- TSDK from absolute user path (default)
- For each workspace, check if the tsdk can be resolved relative to that workspace. Include in suggestions if it does. Filter out duplicate TS versions -
Two+ workspaces where one or more workspaces have tsdk settings in their workspace settings and the user has relative path tsdk setting
Proposed Version Suggestions:
- For each workspace, check both the workspace tsdk and the user tsdk. Include these in suggestions if they can be resolved. Filter out duplicate TS versions. Pick first version from the user tsdk setting as the default.
Activity
[-]Pickup TS Versions From All Workspaces for TS Version Selector[/-][+]TS Version Selector for Multiroot Workspaces[/+]mjbvz commentedon Jul 24, 2017
Different proposal now that we have the explicit concept of workspaces and workspace settings:
Scenarios
One folder, no tsdk setting:
Proposed Version Suggestions:
- Bundled TS version
- Version from
node_modulesif it existsOne folder, user tsdk setting:
Proposed Version Suggestions:
- User tsdk version
- Version from
node_modulesif it existsOne folder, folder tsdk setting:
Proposed Version Suggestions:
- Bundled tsdk version
- Folder tsdk version
One folder, user tsdk setting and folder tsdk setting:
Proposed Version Suggestions:
- User tsdk version
- Folder tsdk version
Two+ folders with no tsdk settings
Proposed Version Suggestions:
- Bundled TS version
- Versions from node_modules in folders if these exist
Two+ folders with user tsdk settings that points to an absolute path
Proposed Version Suggestions:
- TS at the absolute path from the tsdk
- Versions from node_modules in folders if these exist
Two+ folders with user tsdk settings that points to a relative path
Proposed Version Suggestions:
- Unsupported tsdk value. User must quality which workspace to use by prefixing tsdk with workspace name
- Versions from node_modules in folders if these exist
Two+ folders workspace tsdk setting
Proposed Version Suggestions:
- Bundled TS version
- Version from workspace tsdk setting
Two+ folders workspace tsdk setting and user tsdk setting
Proposed Version Suggestions:
- User TS version
- Version from workspace tsdk setting
typescript.tsdksettingThe
typescript.tsdksetting will support the following types of paths:/an/absolute/path/./node_modules/typescript/libandnode_modules/typescript/lib- Supported in single folder scenarios only./workspace_name/node_modules/typescript/libandworkspace_name/node_modules/typescript/lib