swiftlang/vscode-swift

Support code-workspace files

Opened this issue · 0 comments

Right now the vscode-swift extension is not working well with multi-root workspaces. Using the asset/test projects as an example

user should be able to define multiple folders

"folders": [
  {
	  "name": "defaultPackage",
	  "path": "./defaultPackage"
  },
  {
	  "name": "diagnostics",
	  "path": "./diagnostics"
  },
],

and multiple task definitions

"tasks": [
	{
		"type": "swift",
		"args": [
			"build",
			"--build-tests",
			"--verbose"
		],
		"cwd": "./defaultPackage",
		"group": "build",
		"label": "swift: Build All (defaultPackage)",
		"detail": "swift build --build-tests --verbose"
	}
]

particularly "cwd" does not resolve properly whether it is relative ./defaultPackage or ${workspaceFolder:defaultPackage}

Note:

  • SourceKit-LSP gets each folder separately and works as expected
  • CodeLLDB resolves the cwd and program options properly with ${workspaceFolder:defaultPackage} or relative ./defaultPackage