From 1bfaf16d1ceb1d05d636789792326ed55facb2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllenborn?= Date: Wed, 5 Jan 2022 18:40:06 +0100 Subject: [PATCH 1/7] Update Dockerfile Remove unnecessary package --- containers/swift/.devcontainer/Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/containers/swift/.devcontainer/Dockerfile b/containers/swift/.devcontainer/Dockerfile index 3895a40fa6..9d3f20dd76 100644 --- a/containers/swift/.devcontainer/Dockerfile +++ b/containers/swift/.devcontainer/Dockerfile @@ -14,15 +14,8 @@ ARG USER_GID=$USER_UID COPY library-scripts/common-debian.sh /tmp/library-scripts/ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \ - && apt-get -y install --no-install-recommends lldb python3-minimal libpython3.7 \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/library-scripts -# Install SourceKite, see https://github.com/vknabel/vscode-swift-development-environment/blob/master/README.md#installation -RUN git clone https://github.com/vknabel/sourcekite \ - && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/swift:/usr/lib \ - && ln -s /usr/lib/libsourcekitdInProc.so /usr/lib/sourcekitdInProc \ - && cd sourcekite && make install PREFIX=/usr/local -j2 - # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" ENV NVM_DIR=/usr/local/share/nvm From 3152d413c57a3a2e2d6fc51567f3e9e113d00577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllenborn?= Date: Wed, 5 Jan 2022 18:54:45 +0100 Subject: [PATCH 2/7] Update devcontainer.json --- containers/swift/.devcontainer/devcontainer.json | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/containers/swift/.devcontainer/devcontainer.json b/containers/swift/.devcontainer/devcontainer.json index 8bf1eb5a59..7f93a691e4 100644 --- a/containers/swift/.devcontainer/devcontainer.json +++ b/containers/swift/.devcontainer/devcontainer.json @@ -17,16 +17,20 @@ // Set *default* container specific settings.json values on container create. "settings": { - "lldb.adapterType": "bundled", - "lldb.executable": "/usr/bin/lldb", - "sde.languageservermode": "sourcekite", - "swift.path.sourcekite": "/usr/local/bin/sourcekite" + "lldb.library": "/usr/lib/liblldb.so", + "sourcekit-lsp.toolchainPath": "/usr/bin/", + "sourcekit-lsp.serverPath": "/usr/bin/sourcekit-lsp", + "apple-swift-format.path": "/workspaces/swift-format/.build/release/swift-format", }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ - "vknabel.vscode-swift-development-environment", - "vadimcn.vscode-lldb" + "sswg.swift-lang", + "vadimcn.vscode-lldb", + "hbenl.vscode-test-explorer", + "makeitbetter.vscode-swift-test-adapter", + "fredapackages.swift-add-documentation", + "vknabel.vscode-apple-swift-format", ], // Use 'forwardPorts' to make a list of ports inside the container available locally. From 147ecb589905ffa96df8e3b991f7c8afd2b1ee42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllenborn?= Date: Wed, 5 Jan 2022 19:29:59 +0100 Subject: [PATCH 3/7] Update devcontainer.json swift-format --- containers/swift/.devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/swift/.devcontainer/devcontainer.json b/containers/swift/.devcontainer/devcontainer.json index 7f93a691e4..9a3ef9a76d 100644 --- a/containers/swift/.devcontainer/devcontainer.json +++ b/containers/swift/.devcontainer/devcontainer.json @@ -37,7 +37,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "swiftc --version", + "postCreateCommand": "[[ ! -d /workspaces/swift-format ]] && cd /workspaces && git clone --single-branch -b 0.50500.0 https://github.com/apple/swift-format.git --quiet && cd swift-format && swift build -c release --product swift-format", // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "vscode" From 2a98cff317d687360966fecf51ce1b9b38ebe375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllenborn?= Date: Fri, 7 Jan 2022 15:37:47 +0100 Subject: [PATCH 4/7] Update devcontainer.json --- containers/swift/.devcontainer/devcontainer.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/containers/swift/.devcontainer/devcontainer.json b/containers/swift/.devcontainer/devcontainer.json index 9a3ef9a76d..1586f523c8 100644 --- a/containers/swift/.devcontainer/devcontainer.json +++ b/containers/swift/.devcontainer/devcontainer.json @@ -18,26 +18,19 @@ // Set *default* container specific settings.json values on container create. "settings": { "lldb.library": "/usr/lib/liblldb.so", - "sourcekit-lsp.toolchainPath": "/usr/bin/", - "sourcekit-lsp.serverPath": "/usr/bin/sourcekit-lsp", - "apple-swift-format.path": "/workspaces/swift-format/.build/release/swift-format", }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "sswg.swift-lang", "vadimcn.vscode-lldb", - "hbenl.vscode-test-explorer", - "makeitbetter.vscode-swift-test-adapter", - "fredapackages.swift-add-documentation", - "vknabel.vscode-apple-swift-format", ], // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "[[ ! -d /workspaces/swift-format ]] && cd /workspaces && git clone --single-branch -b 0.50500.0 https://github.com/apple/swift-format.git --quiet && cd swift-format && swift build -c release --product swift-format", + // "postCreateCommand": "", // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "vscode" From e1ebad26128b9799d0b2aae25e45385026f616fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllenborn?= Date: Fri, 7 Jan 2022 16:11:23 +0100 Subject: [PATCH 5/7] Update devcontainer.json --- containers/swift/.devcontainer/devcontainer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/containers/swift/.devcontainer/devcontainer.json b/containers/swift/.devcontainer/devcontainer.json index 1586f523c8..9a60c01b39 100644 --- a/containers/swift/.devcontainer/devcontainer.json +++ b/containers/swift/.devcontainer/devcontainer.json @@ -16,9 +16,7 @@ ], // Set *default* container specific settings.json values on container create. - "settings": { - "lldb.library": "/usr/lib/liblldb.so", - }, + "settings": { }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ From f4e9dcf5010085b602eb4e7786c3c010950cb59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllenborn?= Date: Fri, 7 Jan 2022 16:17:55 +0100 Subject: [PATCH 6/7] Update devcontainer.json --- containers/swift/.devcontainer/devcontainer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/containers/swift/.devcontainer/devcontainer.json b/containers/swift/.devcontainer/devcontainer.json index 9a60c01b39..18a44a15ba 100644 --- a/containers/swift/.devcontainer/devcontainer.json +++ b/containers/swift/.devcontainer/devcontainer.json @@ -16,12 +16,13 @@ ], // Set *default* container specific settings.json values on container create. - "settings": { }, + "settings": { + "lldb.library": "/usr/lib/liblldb.so", + }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "sswg.swift-lang", - "vadimcn.vscode-lldb", ], // Use 'forwardPorts' to make a list of ports inside the container available locally. From e4bc64f545b69849467ad59058298fa0a5fc1267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllenborn?= Date: Sun, 9 Jan 2022 13:09:37 +0100 Subject: [PATCH 7/7] Update README.md --- containers/swift/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/swift/README.md b/containers/swift/README.md index e0e2918a99..74ab11d5fe 100644 --- a/containers/swift/README.md +++ b/containers/swift/README.md @@ -6,7 +6,7 @@ | Metadata | Value | |----------|-------| -| *Contributors* | [cloudnull](https://github.com/cloudnull) | +| *Contributors* | [0xTim](https://github.com/0xTim), [adam-fowler](https://github.com/adam-fowler), [cloudnull](https://github.com/cloudnull) | | *Categories* | Community, Languages | | *Definition type* | Dockerfile | | *Supported architecture(s)* | x86-64 | @@ -62,4 +62,4 @@ This definition includes some test code that will help you verify it is working Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the MIT License. See [LICENSE](https://github.com/microsoft/vscode-dev-containers/blob/main/LICENSE). \ No newline at end of file +Licensed under the MIT License. See [LICENSE](https://github.com/microsoft/vscode-dev-containers/blob/main/LICENSE).