diff --git a/scripts/install_dive.sh b/scripts/install_dive.sh new file mode 100755 index 0000000..68c230a --- /dev/null +++ b/scripts/install_dive.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-FileCopyrightText: 2026 Contributors to the Eclipse Foundation +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +echo "Installing dive..." + +DIVE_NAME="/tmp/dive.deb" + +VERSION="0.13.1" + +ARCHITECTURE="$(uname -m)" +if [ "${ARCHITECTURE}" = "x86_64" ]; then + ARCH="amd64" + SHA256SUM="0c20d18f0cc87e6e982a3289712ac3aa9fc364ba973109d1da3a473232640571" +else + ARCH="arm64" + SHA256SUM="80203401b3d7c4feffd13575755a07834a2d2f35f49e8612f0749b318c3f2fa5" +fi + +curl -L "https://github.com/wagoodman/dive/releases/download/v${VERSION}/dive_${VERSION}_linux_${ARCH}.deb" -o "${DIVE_NAME}" +echo "${SHA256SUM} /tmp/dive.deb" | sha256sum -c - || exit 1 +sudo dpkg -i "${DIVE_NAME}" +rm -f "${DIVE_NAME}" + +# Verify installation +dive --version diff --git a/src/s-core-devcontainer/.devcontainer/devcontainer-lock.json b/src/s-core-devcontainer/.devcontainer/devcontainer-lock.json index 7e98f7e..46ea787 100644 --- a/src/s-core-devcontainer/.devcontainer/devcontainer-lock.json +++ b/src/s-core-devcontainer/.devcontainer/devcontainer-lock.json @@ -1,10 +1,5 @@ { "features": { - "ghcr.io/devcontainers-community/features/llvm": { - "version": "3.2.0", - "resolved": "ghcr.io/devcontainers-community/features/llvm@sha256:4f464ab97a59439286a55490b55ba9851616f6f76ac3025e134127ac08ad79e2", - "integrity": "sha256:4f464ab97a59439286a55490b55ba9851616f6f76ac3025e134127ac08ad79e2" - }, "ghcr.io/devcontainers-extra/features/pre-commit:2": { "version": "2.0.18", "resolved": "ghcr.io/devcontainers-extra/features/pre-commit@sha256:6e0bb2ce80caca1d94f44dab5d0653d88a1c00984e590adb7c6bce012d0ade6e", @@ -14,11 +9,6 @@ "version": "2.5.4", "resolved": "ghcr.io/devcontainers/features/common-utils@sha256:00fd45550f578d9d515044d9e2226e908dbc3d7aa6fcb9dee4d8bdb60be114cf", "integrity": "sha256:00fd45550f578d9d515044d9e2226e908dbc3d7aa6fcb9dee4d8bdb60be114cf" - }, - "ghcr.io/devcontainers/features/rust": { - "version": "1.5.0", - "resolved": "ghcr.io/devcontainers/features/rust@sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c", - "integrity": "sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c" } } } \ No newline at end of file diff --git a/src/s-core-devcontainer/.devcontainer/devcontainer.json b/src/s-core-devcontainer/.devcontainer/devcontainer.json index 93380d1..375bbbc 100644 --- a/src/s-core-devcontainer/.devcontainer/devcontainer.json +++ b/src/s-core-devcontainer/.devcontainer/devcontainer.json @@ -21,22 +21,6 @@ "userGid": "1000", "upgradePackages": "false" // WARNING: do *not* enable; this would include packages also from other features, which may have been pinned to a specific version }, - "ghcr.io/devcontainers-community/features/llvm": { - // Full semantic version pinning does not work with this feature. - // In case we want this, the feature needs to be replaced with a custom installation script. - "version": "20" - }, - "ghcr.io/devcontainers/features/rust": { - "version": "1.83.0", - "components": [ - "cargo", - "clippy", - // "miri", // only available at nightly - "rust-analyzer", - "rust-src", - "rustfmt" - ] - }, "./s-core-local": {}, "./bazel-feature": {} }, @@ -44,8 +28,6 @@ // this order makes it more convenient to develop the local features, since they will be installed last // which means changes to it will be applied without needing to rebuild all other features "ghcr.io/devcontainers/features/common-utils", - "ghcr.io/devcontainers-community/features/llvm", - "ghcr.io/devcontainers/features/rust", "./s-core-local", "./bazel-feature" ], @@ -70,7 +52,7 @@ "rust-lang.rust-analyzer", // Rust language support for Visual Studio Code; see also tasks below "github.vscode-pull-request-github", // GitHub integration "bierner.markdown-preview-github-styles", // GitHub style for Markdown preview - "ms-sarifvscode.sarif-viewer" // CodeQL report viewer + "ms-sarifvscode.sarif-viewer" // CodeQL report viewer ], "settings": { "files.insertFinalNewline": true, @@ -78,7 +60,6 @@ "[cpp]": { "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" }, - "clangd.path": "/usr/bin/clangd", "clangd.arguments": [ "--compile-commands-dir=${workspaceFolder}/", "--pretty", diff --git a/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh b/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh index 13820db..e61ef51 100755 --- a/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh +++ b/src/s-core-devcontainer/.devcontainer/s-core-local/install.sh @@ -154,11 +154,6 @@ if [ "${VARIANT}" != "noinstall" ]; then done fi - -# Bash completion for rust tooling -rustup completions bash rustup >> /etc/bash_completion.d/rustup.bash -rustup completions bash cargo >> /etc/bash_completion.d/cargo.bash - # Cleanup # REMOVE CONTAINER BUILD DEPENDENCIES apt-get remove --purge -y apt-transport-https zstd diff --git a/src/s-core-devcontainer/test-project/test.sh b/src/s-core-devcontainer/test-project/test.sh index c590310..d7c2832 100755 --- a/src/s-core-devcontainer/test-project/test.sh +++ b/src/s-core-devcontainer/test-project/test.sh @@ -18,19 +18,6 @@ set -euo pipefail source "test-utils.sh" vscode -# C++ tooling -check "validate clangd is working and has the correct version" bash -c "clangd --version | grep '20.1.8'" -check "validate clang-format is working and has the correct version" bash -c "clang-format --version | grep '20.1.8'" -check "validate clang-tidy is working and has the correct version" bash -c "clang-tidy --version | grep '20.1.8'" -check "validate clang is working and has the correct version" bash -c "clang --version | grep '20.1.8'" - -# Rust tooling -check "validate rustc is working and has the correct version" bash -c "rustc --version | grep '1.83.0'" -check "validate cargo is working and has the correct version" bash -c "cargo --version | grep '1.83.0'" -check "validate cargo clippy is working and has the correct version" bash -c "cargo clippy --version | grep '0.1.83'" -check "validate rustfmt is working and has the correct version" bash -c "rustfmt --version | grep '1.8.0-stable'" -check "validate rust-analyzer is working and has the correct version" bash -c "rust-analyzer --version | grep '1.83.0'" - # Tests from the local s-core-local feature source /devcontainer/features/s-core-local/tests/test_default.sh