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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,15 @@
2
2
3
3
## {{releaseVersion}} - {{releaseDate}}
4
4
5
+
### Added
6
+
7
+
- New `swift.createTasksForLibraryProducts` setting that when enabled causes the extension to automatically create and provide tasks for library products ([#1741](https://github.com/swiftlang/vscode-swift/pull/1741))
8
+
5
9
## 2.10.0 - 2025-07-28
6
10
7
11
### Added
8
12
9
-
- Added Swiftly toolchain management support `.swift-version` files, and integration with the toolchain selection UI ([#1717](https://github.com/swiftlang/vscode-swift/pull/1717)
13
+
- Added Swiftly toolchain management support `.swift-version` files, and integration with the toolchain selection UI ([#1717](https://github.com/swiftlang/vscode-swift/pull/1717))
10
14
- Added code lenses to run suites/tests, configurable with the `swift.showTestCodeLenses` setting ([#1698](https://github.com/swiftlang/vscode-swift/pull/1698))
11
15
- New `swift.excludePathsFromActivation` setting to ignore specified sub-folders from being activated as projects ([#1693](https://github.com/swiftlang/vscode-swift/pull/1693))
12
16
- New `swift.recordTestDuration` setting to disable capturing test durations, which can improve performance of heavy test runs ([#1745](https://github.com/swiftlang/vscode-swift/pull/1745))
Copy file name to clipboardExpand all lines: package.json
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -657,6 +657,12 @@
657
657
],
658
658
"scope": "application"
659
659
},
660
+
"swift.createTasksForLibraryProducts": {
661
+
"type": "boolean",
662
+
"default": false,
663
+
"markdownDescription": "When enabled, the extension will create \"swift\" build tasks for library products in the package manifest. Note that automatic library products will not be included.",
Copy file name to clipboardExpand all lines: userdocs/userdocs.docc/Articles/Features/automatic-task-creation.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,17 @@ Add tasks for common operations with your Package.
5
5
For workspaces that contain a `Package.swift` file, the Swift extension adds the following tasks:
6
6
7
7
-**Build All**: Build all targets in the Package.
8
-
-**Build Debug <Executable>**: Each executable in a Package.swift get a task for building a debug build.
9
-
-**Build Release <Executable>**: Each executable in a Package.swift get a task for building a release build.
8
+
-**Build Debug \<Executable\>**: Each executable product in a Package.swift get a task for building a debug build.
9
+
-**Build Release \<Executable\>**: Each executable product in a Package.swift get a task for building a release build.
10
10
11
11
> 💡 Tip: Tasks use workflows common to all VS Code extensions. For more information see [the VS Code documentation for tasks](https://code.visualstudio.com/docs/editor/tasks).
12
12
13
13
These tasks are available via the commands **Terminal ▸ Run Task...** and **Terminal ▸ Run Build Task...** in the command palette.
14
+
15
+
## Create tasks for library targets
16
+
17
+
By default build tasks are only automatically created for executable products. If you set the `swift.createTasksForLibraryProducts` setting to true, then additional tasks will be created:
18
+
-**Build Debug \<Library\>**: Each library product in a Package.swift get a task for building a debug build.
19
+
-**Build Release \<Library\>**: Each library product in a Package.swift get a task for building a release build.
20
+
21
+
> ⚠️ Important: Tasks will not be created for automatic library products, as you cannot specify a `--product` option for automatic products when building. For more information see the [Swift Package Manager documentation for Product definitions](https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html#product).
0 commit comments