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: Documentation/Contributing.md
+19-85Lines changed: 19 additions & 85 deletions
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,29 @@ There are several types of contributions one can make. Bug fixes, documentation
3
3
4
4
Larger changes that do materially change the semantics of Swift Package Manager (e.g. changes to the manifest format or behavior) are required to go through [Swift Evolution Process](https://github.com/apple/swift-evolution/blob/master/process.md).
5
5
6
-
To see how previous evolution decisions for SwiftPM have been made and have some direction for the development of future features please check out the [Community Proposal](Documentation/Internals/PackageManagerCommunityProposal.md).
6
+
To see how previous evolution decisions for SwiftPM have been made and have some direction for the development of future features please check out the [Community Proposals](https://forums.swift.org/tag/packagemanager).
7
7
8
8
For more information about making contributions to the Swift project in general see [Swift Contribution Guide](https://swift.org/contributing/).
*[Guide for filing quality bug reports](https://github.com/apple/swift-package-manager/blob/main/Documentation/Resources.md#reporting-a-good-swiftpm-bug)
13
+
11
14
Report a bug guide: https://github.com/apple/swift-package-manager/blob/main/Documentation/Resources.md#reporting-a-good-swiftpm-bug.
12
15
JIRA Bug Tracker (a place where you can open bugs, enhancements to start to contribute): [https://bugs.swift.org/browse/SR-13640?jql=component%20%3D%20%22Package%20Manager%22](https://bugs.swift.org/browse/SR-13640?jql=component%20%3D%20%22Package%20Manager%22).
13
16
14
17
## Development environment
15
18
16
-
SwiftPM is typically built with a pre-existing versions of SwiftPM present on the system. Which can be obtained by installing the latest release of Xcode or a toolchain from swift.org. But there are have multiple ways to setup your development environment:
19
+
SwiftPM is typically built with a pre-existing version of SwiftPM present on the system, but there are have multiple ways to setup your development environment:
17
20
18
21
### Using Xcode (Easiest)
19
22
20
-
1. Install latest Xcode from https://developer.apple.com/xcode
21
-
2. Open SwiftPM's `Package.swift` manifest with the latest release (including betas) of Xcode.
23
+
1. Install Xcode from [https://developer.apple.com/xcode](https://developer.apple.com/xcode) (including betas!).
24
+
2. Open SwiftPM's `Package.swift manifest with Xcode.
22
25
23
26
### Using a Swift toolchain
24
27
25
28
1. Download a toolchain from https://swift.org/download/
6. Clone [swift-argument-parser](https://github.com/apple/swift-argument-parser) beside the package manager directory and check out tag with the [latest version](https://github.com/apple/swift-argument-parser/tags).
97
+
4. Clone [swift-argument-parser](https://github.com/apple/swift-argument-parser) beside the package manager directory and check out tag with the [latest version](https://github.com/apple/swift-argument-parser/tags).
Note: The bootstrap script requires having [CMake](https://cmake.org/) and [Ninja](https://ninja-build.org/) installed. Please refer to the [Swift project repo](https://github.com/apple/swift/blob/master/README.md#macos) for installation instructions.
111
+
Note: The bootstrap script requires having [CMake](https://cmake.org/) and [Ninja](https://ninja-build.org/) installed. Please refer to the [Swift project repo](https://github.com/apple/swift/blob/master/README.md#macos) for installation instructions.
110
112
111
113
This command builds the Package Manager inside the `.build/` directory.
112
114
Run the bootstrap script to rebuild after making a change to the source
113
115
code.
114
116
115
-
<aid="self-hosting">*_Self Hosting_*</a>:
116
-
117
-
It is possible to build SwiftPM with itself using SwiftPM present in latest
118
-
release of Xcode or the latest trunk snapshot on Linux.
119
-
120
-
```bash
121
-
# Build:
122
-
$> swift build
123
-
124
-
# Run all tests.
125
-
$> swift test --parallel
126
-
127
-
# Run a single test.
128
-
For example, to only run the `PackageGraphTests.DependencyResolverTests/testBasics`
129
-
$> swift test --filter PackageGraphTests.DependencyResolverTests/testBasics
130
-
131
-
# Run tests for the test targets BuildTests and WorkspaceTests, but skip some test cases.
132
-
$> swift test --filter BuildTests --skip BuildPlanTests --filter WorkspaceTests --skip InitTests
133
-
```
134
-
135
-
Note: PackageDescription v4 is not available when developing using this method.
136
-
137
-
This method can also used be used for performance testing. Use the following
138
-
command run SwiftPM's performance tests:
139
-
140
-
```bash
141
-
$>export TSC_ENABLE_PERF_TESTS=1
142
-
$> swift test -c release --filter PerformanceTests
143
-
```
144
-
145
-
<aid="swift-compiler-build-script">*E) _Using the Swift Compiler Build Script_*</a>:
146
-
147
-
Follow [these](https://github.com/apple/swift#getting-started) instructions to
148
-
get the Swift sources and then execute the `build-script` using swiftpm preset:
@@ -257,22 +196,18 @@ $> Utilities/Docker/docker-utils swift-run # to run swift-run in the container
257
196
7. Commit (include the Radar link or JIRA issue id in the commit message if possible and a description your changes). Try to have only 1 commit in your PR (but, of course, if you add changes that can be helpful to be kept aside from the previous commit, make a new commit for them).
258
197
8. Push the commit / branch to your fork
259
198
9. Make a PR from your fork / branch to `apple: main`
260
-
10. Reviewers are going to be automatically added to your PR
261
-
11. Merge pull request when you received approval from the reviewers (one or more)
199
+
10. While creating your PR, make sure to follow the PR Template providing information about the motivation and highlighting the changes.
200
+
11. Reviewers are going to be automatically added to your PR
201
+
12. Merge pull request when you received approval from the reviewers (one or more)
262
202
263
203
## Using Continuous Integration
264
-
SwiftPM uses [swift-ci](https://ci.swift.org) infrastructure for its continuous integration testing. The bots can be triggered on pull-requests if you have commit access. Otherwise, ask
265
-
one of the code owners to trigger them for you. The following commands are supported:
266
-
267
-
```
268
-
@swift-ci please smoke test
269
-
```
204
+
SwiftPM uses [swift-ci](https://ci.swift.org) infrastructure for its continuous integration testing. The bots can be triggered on pull-requests if you have commit access. Otherwise, ask one of the code owners to trigger them for you.
270
205
271
206
Run tests with the trunk compiler and other projects. This is **required** before
272
207
a pull-request can be merged.
273
208
274
209
```
275
-
@swift-ci please smoke test self hosted
210
+
@swift-ci please smoke test
276
211
```
277
212
278
213
Run just the self-hosted tests. This has fast turnaround times so it can be used
@@ -307,13 +242,12 @@ path which exists on disk. If none of the paths are present on disk, it will fal
307
242
back to built-in computation.
308
243
309
244
## Making changes in TSC targets
310
-
All targets with the prefix TSC define the interface for the tools support core. Those APIs might be used in other projects as well and need to be updated in this repository by copying their sources directories to the TSC repository. The repository can be found [here](https://github.com/apple/swift-tools-support-core).
245
+
SwiftPM uses [Tools Support Core](https://github.com/apple/swift-tools-support-core) (aka TSC) for many of its general purpose utilities. Changes in SwiftPM often require changes in TSC first. To coordinate changes, open a PR against TSC first, then a second one against SwiftPM pulling the correct TSC version.
311
246
312
247
## Community and Support
313
248
If you want to connect with the Swift community you can:
314
249
* Use Swift Forums: [https://forums.swift.org/c/development/SwiftPM](https://forums.swift.org/c/development/SwiftPM)
315
250
* Contact the CODEOWNERS: https://github.com/apple/swift-package-manager/blob/main/CODEOWNERS
note("clone llbuild next to swiftpm directory; see development docs: https://github.com/apple/swift-package-manager/blob/master/Documentation/Contributing.md#using-trunk-snapshot")
648
+
note("clone llbuild next to swiftpm directory; see development docs: https://github.com/apple/swift-package-manager/blob/master/Documentation/Contributing.md")
649
649
error("unable to find llbuild source directory at %s"%llbuild_path)
0 commit comments