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: CONTRIBUTING.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,40 @@ swift build
96
96
swift test
97
97
```
98
98
99
+
## Developing in the Linux devcontainer
100
+
101
+
SwiftPM includes a devcontainer configuration that allows you to develop in a containerized environment with VS Code. This approach provides a consistent development environment with all necessary dependencies pre-installed, regardless of your host operating system.
102
+
103
+
### Prerequisites
104
+
105
+
1. Install [Visual Studio Code](https://code.visualstudio.com/)
106
+
2. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) for VS Code
107
+
3. Install [Docker](https://www.docker.com/products/docker-desktop/) on your system
108
+
109
+
### Opening the Project in a Container
110
+
111
+
1. Clone the SwiftPM repository (if you haven't already)
112
+
2. Open the SwiftPM folder in VS Code
113
+
3. VS Code will detect the devcontainer configuration and prompt you to "Reopen in Container". Click this button to start building and opening the container
114
+
- Alternatively, you can press `F1`, type "Dev Containers: Reopen in Container", and press Enter
115
+
4. Wait for the container to build and initialize (this may take a few minutes the first time)
116
+
117
+
### What's Included in the Dev Container
118
+
119
+
The SwiftPM devcontainer is based on the `swiftlang/swift:nightly-main` Docker image and includes:
120
+
121
+
- Swift nightly build from the main branch
122
+
- Git
123
+
- Common development utilities
124
+
- VS Code Swift extension for syntax highlighting and language support
125
+
- Debugging support with LLDB
126
+
127
+
### Building and Testing in the Container
128
+
129
+
Once you've opened the project in VS Code, choose `> Dev Containers: Build and Reopen in Container` from the command pallete. Once the container finishes building it will open and you can develop as if you are on Linux using VS Code.
130
+
131
+
All the commands described in the "Local Development" section below will work in the container environment.
132
+
99
133
## Local Development
100
134
101
135
With a Swift toolchain installed and the SwiftPM code cloned, you are ready to make changes and test them locally.
0 commit comments