Skip to content

Commit 3750567

Browse files
Add ISSUE_TEMPLATE.md and PULL_REQUEST_TEMPLATE.md
1 parent a569248 commit 3750567

File tree

4 files changed

+53
-86
lines changed

4 files changed

+53
-86
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Expected behavior
2+
_[what you expected to happen]_
3+
4+
### Actual behavior
5+
_[what actually happened]_
6+
7+
### Steps to reproduce
8+
9+
1. ...
10+
2. ...
11+
12+
### If possible, minimal yet complete reproducer code (or URL to code)
13+
14+
_[anything to help us reproducing the issue]_
15+
16+
### SwiftMetrics version/commit hash
17+
18+
_[the Swift Package Manager tag/commit hash]_
19+
20+
### Swift & OS version (output of `swift --version && uname -a`)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
_[One line description of your change]_
2+
3+
### Motivation:
4+
5+
_[Explain here the context, and why you're making that change. What is the problem you're trying to solve.]_
6+
7+
### Modifications:
8+
9+
_[Describe the modifications you've done.]_
10+
11+
### Result:
12+
13+
_[After your change, what will change.]_

Documentation/Contributing.md

Lines changed: 19 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@ There are several types of contributions one can make. Bug fixes, documentation
33

44
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).
55

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).
77

88
For more information about making contributions to the Swift project in general see [Swift Contribution Guide](https://swift.org/contributing/).
99

1010
## Reporting issues
11+
* [SwiftPM JIRA Bug Tracker](https://bugs.swift.org/browse/SR-13640?jql=component%20%3D%20%22Package%20Manager%22)
12+
* [Guide for filing quality bug reports](https://github.com/apple/swift-package-manager/blob/main/Documentation/Resources.md#reporting-a-good-swiftpm-bug)
13+
1114
Report a bug guide: https://github.com/apple/swift-package-manager/blob/main/Documentation/Resources.md#reporting-a-good-swiftpm-bug.
1215
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).
1316

1417
## Development environment
1518

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:
1720

1821
### Using Xcode (Easiest)
1922

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.
2225

2326
### Using a Swift toolchain
2427

2528
1. Download a toolchain from https://swift.org/download/
26-
2729
2. Confirm the toolchain is installed correctly:
2830

2931
*macOS*
@@ -71,7 +73,7 @@ $> ./swift/utils/build-script --preset=buildbot_swiftpm_macos_platform,tools=RA,
7173
$> ./swift/utils/build-script --preset=buildbot_swiftpm_linux_platform,tools=RA,stdlib=RA
7274
```
7375

74-
3. Clone [llbuild](https://github.com/apple/swift-llbuild) beside the package manager directory.
76+
1. Clone [llbuild](https://github.com/apple/swift-llbuild) beside the package manager directory.
7577

7678
```bash
7779
$> git clone https://github.com/apple/swift-llbuild llbuild
@@ -80,101 +82,38 @@ $> git clone https://github.com/apple/swift-llbuild llbuild
8082
Note: Make sure the directory for llbuild is called "llbuild" and not
8183
"swift-llbuild".
8284

83-
4. Clone [Yams](https://github.com/jpsim/yams) beside the package manager directory.
85+
2. Clone [Yams](https://github.com/jpsim/yams) beside the package manager directory.
8486

8587
```bash
8688
$> git clone https://github.com/jpsim/yams
8789
```
8890

89-
5. Clone [swift-driver](https://github.com/apple/swift-driver) beside the package manager directory.
91+
3. Clone [swift-driver](https://github.com/apple/swift-driver) beside the package manager directory.
9092

9193
```bash
9294
$> git clone https://github.com/apple/swift-driver
9395
```
9496

95-
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).
9698

9799
For example, if the latest tag is 0.3.1:
98100
```bash
99101
$> git clone https://github.com/apple/swift-argument-parser --branch 0.3.1
100102
```
101103

102-
7. Build the Swift Package Manager.
104+
5. Build the Swift Package Manager.
103105

104106
```bash
105107
$> cd swiftpm
106108
$> Utilities/bootstrap build
107109
```
108110

109-
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.
110112

111113
This command builds the Package Manager inside the `.build/` directory.
112114
Run the bootstrap script to rebuild after making a change to the source
113115
code.
114116

115-
<a id="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-
<a id="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:
149-
150-
### macOS
151-
152-
```bash
153-
$> ./swift/utils/build-script --preset=buildbot_swiftpm_macos_platform,tools=RA,stdlib=RA
154-
```
155-
156-
### Linux
157-
158-
```bash
159-
$> ./swift/utils/build-script --preset=buildbot_swiftpm_linux_platform,tools=RA,stdlib=RA
160-
```
161-
162-
Once the build is complete, you should be able to run the swiftpm binaries from the build folder.
163-
164-
### Example
165-
166-
```bash
167-
$> cd /tmp && mkdir hello && cd hello
168-
$> /path/to/swiftpm/.build/x86_64-apple-macosx/debug/swift-package init
169-
$> /path/to/swiftpm/.build/x86_64-apple-macosx/debug/swift-build
170-
```
171-
172-
8. Test the Swift Package Manager.
173-
174-
```bash
175-
$> Utilities/bootstrap test
176-
```
177-
178117
## Building
179118
1. Pull the SwiftPM repository:
180119
```bash
@@ -257,22 +196,18 @@ $> Utilities/Docker/docker-utils swift-run # to run swift-run in the container
257196
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).
258197
8. Push the commit / branch to your fork
259198
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)
262202

263203
## 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.
270205

271206
Run tests with the trunk compiler and other projects. This is **required** before
272207
a pull-request can be merged.
273208

274209
```
275-
@swift-ci please smoke test self hosted
210+
@swift-ci please smoke test
276211
```
277212

278213
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
307242
back to built-in computation.
308243

309244
## 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.
311246

312247
## Community and Support
313248
If you want to connect with the Swift community you can:
314249
* Use Swift Forums: [https://forums.swift.org/c/development/SwiftPM](https://forums.swift.org/c/development/SwiftPM)
315250
* Contact the CODEOWNERS: https://github.com/apple/swift-package-manager/blob/main/CODEOWNERS
316-
(mailing lists are usually the best place to go for help: [[email protected]](mailto:[email protected]), [[email protected]](mailto:[email protected]), [[email protected]](mailto:[email protected])
317251

318252
## Additional resources
319253
* `Swift.org` Contributing page

Utilities/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ def get_llbuild_source_path(args):
645645
llbuild_path = os.path.join(args.project_root, "..", "llbuild")
646646
if os.path.exists(llbuild_path):
647647
return llbuild_path
648-
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")
649649
error("unable to find llbuild source directory at %s" % llbuild_path)
650650

651651
def get_swiftpm_env_cmd(args):

0 commit comments

Comments
 (0)