diff --git a/.github/workflows/code-cleanliness.yml b/.github/workflows/code-cleanliness.yml index 65ce28e47fa..dc8ad24c353 100644 --- a/.github/workflows/code-cleanliness.yml +++ b/.github/workflows/code-cleanliness.yml @@ -4,39 +4,26 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - java-version: '21' - distribution: 'temurin' - cache: maven - - name: Set up Maven - uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5 - with: - maven-version: 3.9.2 - - name: Install dependencies - run: | - sudo apt-get update && sudo apt-get install -y --no-install-recommends \ - libxml2-utils - - name: Install Eclipse SDK - run: | - curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/eclipse-SDK-4.23-linux-gtk-x86_64.tar.gz | tar xz - - name: Run Check Code Cleanliness - run: ECLIPSE=$PWD/eclipse/eclipse ./releng/scripts/check_code_cleanliness_only.sh - - name: Run Bundle Versions Bumped - run: ./releng/scripts/check_bundle_versions.sh - - name: Report on Bundle Versions Bumped - run: ./releng/scripts/check_bundle_versions_report.sh - - name: Upload Logs - uses: actions/upload-artifact@v3 - if: success() || failure() - with: - name: Code Cleanliness Detailed Logs - path: '*.log' + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Run Check Code Cleanliness with Docker + uses: addnab/docker-run-action@v3 + with: + image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519 + options: -v ${{ github.workspace }}:/work + run: | + set -x + cd /work + ./releng/scripts/check_code_cleanliness_only.sh + ./releng/scripts/check_bundle_versions.sh + ./releng/scripts/check_bundle_versions_report.sh + - name: Upload Logs + uses: actions/upload-artifact@v3 + if: success() || failure() + with: + name: Code Cleanliness Detailed Logs + path: "*.log" diff --git a/Jenkinsfile b/Jenkinsfile index ca99350d270..1bfa08abb54 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,7 @@ pipeline { } options { timestamps() + buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '2')) } stages { stage('initialize PGP') { diff --git a/build/org.eclipse.cdt.autotools-feature/feature.xml b/build/org.eclipse.cdt.autotools-feature/feature.xml index 0591c9f49b7..49265710db5 100644 --- a/build/org.eclipse.cdt.autotools-feature/feature.xml +++ b/build/org.eclipse.cdt.autotools-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.autotools.docs eclipse-plugin diff --git a/build/org.eclipse.cdt.core.autotools-feature/feature.xml b/build/org.eclipse.cdt.core.autotools-feature/feature.xml index b05a061c8c1..6d063f88a94 100644 --- a/build/org.eclipse.cdt.core.autotools-feature/feature.xml +++ b/build/org.eclipse.cdt.core.autotools-feature/feature.xml @@ -12,7 +12,7 @@ + + + + + diff --git a/build/org.eclipse.cdt.meson-feature/feature.xml b/build/org.eclipse.cdt.meson-feature/feature.xml index fbabc732ce8..49f676ec3cf 100644 --- a/build/org.eclipse.cdt.meson-feature/feature.xml +++ b/build/org.eclipse.cdt.meson-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.meson.docs eclipse-plugin diff --git a/build/org.eclipse.cdt.meson.ui.tests/pom.xml b/build/org.eclipse.cdt.meson.ui.tests/pom.xml index c0c3ae4277c..4e5709af2f5 100644 --- a/build/org.eclipse.cdt.meson.ui.tests/pom.xml +++ b/build/org.eclipse.cdt.meson.ui.tests/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/build/pom.xml b/build/pom.xml index f3e01737b1e..e3d5b96f58b 100644 --- a/build/pom.xml +++ b/build/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.build-parent diff --git a/cmake/aggregator/pom.xml b/cmake/aggregator/pom.xml index 93fd14e4983..3326cda9c28 100644 --- a/cmake/aggregator/pom.xml +++ b/cmake/aggregator/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cmake-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT cmake-aggregator diff --git a/cmake/org.eclipse.cdt.cmake-feature/feature.xml b/cmake/org.eclipse.cdt.cmake-feature/feature.xml index d91bfbc531b..a6507e216c8 100644 --- a/cmake/org.eclipse.cdt.cmake-feature/feature.xml +++ b/cmake/org.eclipse.cdt.cmake-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/cmake/pom.xml b/cmake/pom.xml index 9b6e908a68a..88db6245062 100644 --- a/cmake/pom.xml +++ b/cmake/pom.xml @@ -17,12 +17,12 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt cmake-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT pom diff --git a/codan/pom.xml b/codan/pom.xml index 74634328e9a..f0152269d20 100644 --- a/codan/pom.xml +++ b/codan/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.codan-parent diff --git a/core/org.eclipse.cdt.core.linux.aarch64/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.linux.aarch64/META-INF/MANIFEST.MF index 7238d477235..d53169d1691 100644 --- a/core/org.eclipse.cdt.core.linux.aarch64/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.linux.aarch64/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.linux.aarch64 Bundle-SymbolicName: org.eclipse.cdt.core.linux.aarch64;singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core.native;bundle-version="[6.3.0,7.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so index a9919b4ca52..8eaf3f18eae 100755 Binary files a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so and b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.linux.aarch64/pom.xml b/core/org.eclipse.cdt.core.linux.aarch64/pom.xml index be0ed95d81c..1f5face2fa6 100644 --- a/core/org.eclipse.cdt.core.linux.aarch64/pom.xml +++ b/core/org.eclipse.cdt.core.linux.aarch64/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.core.linux.aarch64 eclipse-plugin diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.linux.ppc64le/META-INF/MANIFEST.MF index da79b03b8a3..e5b014092f8 100644 --- a/core/org.eclipse.cdt.core.linux.ppc64le/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.linux.ppc64le/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-SymbolicName: org.eclipse.cdt.core.linux.ppc64le;singleton:=true Bundle-ManifestVersion: 2 Bundle-Localization: plugin Bundle-Name: %fragmentName.linux.ppc64le -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Fragment-Host: org.eclipse.cdt.core.native;bundle-version="[6.3.0,7.0.0)" Bundle-Vendor: %providerName Eclipse-PlatformFilter: (&(osgi.os=linux)(osgi.arch=ppc64le)) diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so index cddfefcb258..b472ea7639e 100755 Binary files a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so and b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/pom.xml b/core/org.eclipse.cdt.core.linux.ppc64le/pom.xml index e76c7601811..683fdcd2e4d 100644 --- a/core/org.eclipse.cdt.core.linux.ppc64le/pom.xml +++ b/core/org.eclipse.cdt.core.linux.ppc64le/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.core.linux.ppc64le eclipse-plugin diff --git a/core/org.eclipse.cdt.core.linux.x86_64/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.linux.x86_64/META-INF/MANIFEST.MF index 03fc432ccc2..ace23cf7845 100644 --- a/core/org.eclipse.cdt.core.linux.x86_64/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.linux.x86_64/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.linux.x86_64 Bundle-SymbolicName: org.eclipse.cdt.core.linux.x86_64;singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core.native;bundle-version="[6.3.0,7.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so index 476ea56bdc0..198c2952f93 100755 Binary files a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so and b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.linux.x86_64/pom.xml b/core/org.eclipse.cdt.core.linux.x86_64/pom.xml index 51590860fae..37141c29272 100644 --- a/core/org.eclipse.cdt.core.linux.x86_64/pom.xml +++ b/core/org.eclipse.cdt.core.linux.x86_64/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.core.linux.x86_64 eclipse-plugin diff --git a/core/org.eclipse.cdt.core.linux/pom.xml b/core/org.eclipse.cdt.core.linux/pom.xml index d387087769d..2682842f09b 100644 --- a/core/org.eclipse.cdt.core.linux/pom.xml +++ b/core/org.eclipse.cdt.core.linux/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF index 3507cc97bdb..b47e09820fb 100644 --- a/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.macosx Bundle-SymbolicName: org.eclipse.cdt.core.macosx; singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core.native;bundle-version="[6.3.0,7.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib index 274d27a42a8..34c41c3623f 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib index f5fc0ca37d4..5f3406c40e9 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/pom.xml b/core/org.eclipse.cdt.core.macosx/pom.xml index 831b1ec54e7..c071ad0db22 100644 --- a/core/org.eclipse.cdt.core.macosx/pom.xml +++ b/core/org.eclipse.cdt.core.macosx/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.core.macosx eclipse-plugin diff --git a/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF index d70deadd948..705f42e577f 100644 --- a/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.core.native;singleton:=true -Bundle-Version: 6.3.400.qualifier +Bundle-Version: 6.3.401.qualifier Bundle-Activator: org.eclipse.cdt.internal.core.natives.CNativePlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c b/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c index fb669736037..db7c829ff57 100644 --- a/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c +++ b/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c @@ -24,10 +24,76 @@ #include #include #include +#include +#include +#include /* from pfind.c */ extern char *pfind(const char *name, char *const envp[]); +static int sys_close_range_wrapper(unsigned int from_fd_inclusive) { + // Use fast `close_range` (https://man7.org/linux/man-pages/man2/close_range.2.html) if available. + // Cannot call `close_range` from libc, as it may be unavailable in older libc. +#if defined(__linux__) && defined(SYS_close_range) && defined(CLOSE_RANGE_UNSHARE) + return syscall(SYS_close_range, from_fd_inclusive, ~0U, CLOSE_RANGE_UNSHARE); +#else + errno = ENOSYS; + return -1; +#endif +} + +static int close_all_fds_using_parsing(unsigned int from_fd_inclusive) { + // If `opendir` is implemented using a file descriptor, we may close it accidentally. + // Let's close a few lowest file descriptors, in hope that `opendir` will use it. + int lowest_fds_to_close = 2; + for (int i = 0; i < lowest_fds_to_close; i++) { + close(from_fd_inclusive + i); + } + +#if defined(__APPLE__) +#define FD_DIR "/dev/fd" +#else +#define FD_DIR "/proc/self/fd" +#endif + + DIR *dirp = opendir(FD_DIR); + if (dirp == NULL) + return -1; + + struct dirent *direntp; + + while ((direntp = readdir(dirp)) != NULL) { + if (isdigit(direntp->d_name[0])) { + int fd = strtol(direntp->d_name, NULL, 10); + if (fd >= from_fd_inclusive + lowest_fds_to_close && fd != dirfd(dirp)) { + close(fd); + } + } + } + + closedir(dirp); + + return 0; +} + +static void close_all_fds_fallback(unsigned int from_fd_inclusive) { + int fdlimit = sysconf(_SC_OPEN_MAX); + if (fdlimit == -1) + fdlimit = 65535; // arbitrary default, just in case + for (int fd = from_fd_inclusive; fd < fdlimit; fd++) { + close(fd); + } +} + +static void close_all_fds() { + unsigned int from_fd = STDERR_FILENO + 1; + if (sys_close_range_wrapper(from_fd) == 0) + return; + if (close_all_fds_using_parsing(from_fd) == 0) + return; + close_all_fds_fallback(from_fd); +} + pid_t exec_pty(const char *path, char *const argv[], char *const envp[], const char *dirpath, int channels[3], const char *pts_name, int fdm, int console) { int pipe2[2]; @@ -107,14 +173,7 @@ pid_t exec_pty(const char *path, char *const argv[], char *const envp[], const c } /* Close all the fd's in the child */ - { - int fdlimit = sysconf(_SC_OPEN_MAX); - int fd = 3; - - while (fd < fdlimit) { - close(fd++); - } - } + close_all_fds(); if (envp && envp[0]) { execve(full_path, argv, envp); diff --git a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c index e393cfff6a0..8afc663cdeb 100644 --- a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c +++ b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c @@ -21,10 +21,76 @@ #include #include #include +#include +#include +#include /* from pfind.c */ extern char *pfind(const char *name, char *const envp[]); +static int sys_close_range_wrapper(unsigned int from_fd_inclusive) { + // Use fast `close_range` (https://man7.org/linux/man-pages/man2/close_range.2.html) if available. + // Cannot call `close_range` from libc, as it may be unavailable in older libc. +#if defined(__linux__) && defined(SYS_close_range) && defined(CLOSE_RANGE_UNSHARE) + return syscall(SYS_close_range, from_fd_inclusive, ~0U, CLOSE_RANGE_UNSHARE); +#else + errno = ENOSYS; + return -1; +#endif +} + +static int close_all_fds_using_parsing(unsigned int from_fd_inclusive) { + // If `opendir` is implemented using a file descriptor, we may close it accidentally. + // Let's close a few lowest file descriptors, in hope that `opendir` will use it. + int lowest_fds_to_close = 2; + for (int i = 0; i < lowest_fds_to_close; i++) { + close(from_fd_inclusive + i); + } + +#if defined(__APPLE__) +#define FD_DIR "/dev/fd" +#else +#define FD_DIR "/proc/self/fd" +#endif + + DIR *dirp = opendir(FD_DIR); + if (dirp == NULL) + return -1; + + struct dirent *direntp; + + while ((direntp = readdir(dirp)) != NULL) { + if (isdigit(direntp->d_name[0])) { + int fd = strtol(direntp->d_name, NULL, 10); + if (fd >= from_fd_inclusive + lowest_fds_to_close && fd != dirfd(dirp)) { + close(fd); + } + } + } + + closedir(dirp); + + return 0; +} + +static void close_all_fds_fallback(unsigned int from_fd_inclusive) { + int fdlimit = sysconf(_SC_OPEN_MAX); + if (fdlimit == -1) + fdlimit = 65535; // arbitrary default, just in case + for (int fd = from_fd_inclusive; fd < fdlimit; fd++) { + close(fd); + } +} + +static void close_all_fds() { + unsigned int from_fd = STDERR_FILENO + 1; + if (sys_close_range_wrapper(from_fd) == 0) + return; + if (close_all_fds_using_parsing(from_fd) == 0) + return; + close_all_fds_fallback(from_fd); +} + pid_t exec0(const char *path, char *const argv[], char *const envp[], const char *dirpath, int channels[3]) { int pipe0[2], pipe1[2], pipe2[2]; pid_t childpid; @@ -83,14 +149,7 @@ pid_t exec0(const char *path, char *const argv[], char *const envp[], const char } /* Close all the fd's in the child */ - { - int fdlimit = sysconf(_SC_OPEN_MAX); - int fd = 3; - - while (fd < fdlimit) { - close(fd++); - } - } + close_all_fds(); setpgid(getpid(), getpid()); diff --git a/core/org.eclipse.cdt.core.native/pom.xml b/core/org.eclipse.cdt.core.native/pom.xml index 28c765691f8..a298d1436d0 100644 --- a/core/org.eclipse.cdt.core.native/pom.xml +++ b/core/org.eclipse.cdt.core.native/pom.xml @@ -19,11 +19,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 6.3.400-SNAPSHOT + 6.3.401-SNAPSHOT org.eclipse.cdt.core.native eclipse-plugin diff --git a/core/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF index 69844003b2d..7c7de3320d0 100644 --- a/core/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF @@ -45,7 +45,10 @@ Require-Bundle: org.eclipse.core.resources, org.eclipse.ltk.core.refactoring;bundle-version="3.4.0", org.hamcrest.core, org.hamcrest.library, - com.google.gson;bundle-version="[2.8.6,3.0.0)" + com.google.gson;bundle-version="[2.8.6,3.0.0)", + org.eclipse.cdt.debug.core, + org.eclipse.cdt.cmake.core, + org.eclipse.debug.core Bundle-ActivationPolicy: lazy Bundle-Vendor: %providerName Bundle-RequiredExecutionEnvironment: JavaSE-17 @@ -53,4 +56,6 @@ Automatic-Module-Name: org.eclipse.cdt.core.tests Bundle-Localization: plugin Import-Package: org.junit.jupiter.api;version="5.9.0", org.junit.jupiter.params;version="5.9.0", - org.junit.jupiter.params.provider;version="5.9.0" + org.junit.jupiter.params.provider;version="5.9.0", + org.mockito;version="[5.12.0,6.0.0]", + org.mockito.stubbing;version="[5.12.0,6.0.0]" diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/build/CBuildConfigurationManagerTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/build/CBuildConfigurationManagerTests.java new file mode 100644 index 00000000000..33b5772d208 --- /dev/null +++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/build/CBuildConfigurationManagerTests.java @@ -0,0 +1,131 @@ +/******************************************************************************* + * Copyright (c) 2024 Renesas Electronics Europe. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.cdt.core.build; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import org.eclipse.cdt.cmake.core.CMakeNature; +import org.eclipse.cdt.cmake.core.internal.CMakeBuildConfigurationProvider; +import org.eclipse.cdt.core.CCProjectNature; +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.CProjectNature; +import org.eclipse.cdt.core.parser.IScannerInfoProvider; +import org.eclipse.cdt.core.testplugin.ResourceHelper; +import org.eclipse.cdt.core.testplugin.util.BaseTestCase5; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; +import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsScannerInfoProvider; +import org.eclipse.core.resources.IBuildConfiguration; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.debug.core.ILaunchManager; +import org.junit.jupiter.api.Test; + +public class CBuildConfigurationManagerTests extends BaseTestCase5 { + protected ICBuildConfigurationManager configManager = CDebugCorePlugin + .getService(ICBuildConfigurationManager.class); + + /** + * Tests that CBuildConfigurationManager.getBuildConfiguration(IProject, IToolChain, String, IProgressMonitor) + * calls CCorePlugin.resetCachedScannerInfoProvider(IProject) after creating a new ICBuildConfiguration. + * + * Tests the following failure mode. + * When the project's active IBuildConfiguration has the default name and the chosen ICBuildConfigurationProvider. + * getCBuildConfiguration does not support the IBuildConfiguration.DEFAULT_CONFIG_NAME and returns null, this can + * cause the project's ScannerInfoProvider to become "stuck" + * (https://bugs.eclipse.org/bugs/show_bug.cgi?id=413357) on the wrong setting (eg + * LanguageSettingsScannerInfoProvider instead of ICBuildConfiguration) until Eclipse is restarted or the project + * is closed and reopened. When this happens, the indexer does not function. + * + * This problem may arise if an ISV contributes a ICBuildConfigurationProvider which has very specific naming + * conventions for it's build configurations. + * + * Test approach: + * The test requires that a faulty build configuration is setup for the project to trick the getScannerInfoProvider + * into thinking it's not a core build project. Typically ContainerGCCToolChainProvider may find a valid gcc toolchain + * and then the provider's getCBuildConfiguration will return a valid ICBuildConfiguration. So need to set the active + * build configuration to one which does not use the default name. + * + * (1) + * In a CMake project, add a new build configuration which doesn't use the default name and add this to the project + * using an invalid ICBuildConfiguration and set this as the active build configuration. + * + * (2) + * Later, when the indexer gets the project's active build configuration it is null and so the project's + * IScannerInfoProvider is set to the wrong type and is cached. + * + * (3) + * Later still, a new build configuration is created, this time with a valid ICBuildConfiguration, which is set as the + * project's active build configuration. + * + * (4) + * With the fix in place (resetCachedScannerInfoProvider), the next time the indexer gets the project's + * IScannerInfoProvider it will be recomputed and return the project's expected IScannerInfoProvider + * (ie: ICBuildConfiguration). + */ + @Test + public void testResetCachedScannerInfoProvider() throws Exception { + // (1) create a CMake project + IProject project = createCMakeProject(); + + CMakeBuildConfigurationProvider provider = new CMakeBuildConfigurationProvider(); + String buildConfigBaseName = "notDefaultName"; + // Create a new IBuildConfiguration with a name that is not the default name. + IBuildConfiguration buildConfiguration = configManager.createBuildConfiguration(provider, project, + buildConfigBaseName, new NullProgressMonitor()); + // Add the IBuildConfiguration/ICBuildConfiguration combo using an invalid ICBuildConfiguration + configManager.addBuildConfiguration(buildConfiguration, null); + // Set the IBuildConfiguration, with this name, as the active build config + IProjectDescription description = project.getDescription(); + String buildConfigName = provider.getId() + "/" + buildConfigBaseName; + description.setActiveBuildConfig(buildConfigName); + project.setDescription(description, new NullProgressMonitor()); + + // (2) The project's scannerInfoProvider is expected to be the wrong type here + IScannerInfoProvider scannerInfoProvider = CCorePlugin.getDefault().getScannerInfoProvider(project); + assertThat("scannerInfoProvider expected to be LanguageSettingsScannerInfoProvider", + scannerInfoProvider instanceof LanguageSettingsScannerInfoProvider); + + // (3) Setup a toolchain ready to use for creating the valid ICBuildConfiguration + IToolChain mockToolchain = mock(IToolChain.class); + when(mockToolchain.getProperty(IToolChain.ATTR_OS)).thenReturn("osDummy"); + when(mockToolchain.getProperty(IToolChain.ATTR_ARCH)).thenReturn("archDummy"); + when(mockToolchain.getTypeId()).thenReturn("tc_typeId"); + when(mockToolchain.getId()).thenReturn("tcId"); + when(mockToolchain.getBuildConfigNameFragment()).thenReturn("buildConfigName"); + + ICBuildConfiguration cBuildConfiguration = configManager.getBuildConfiguration(project, mockToolchain, + ILaunchManager.RUN_MODE, new NullProgressMonitor()); + assertThat("The cBuildConfiguration should of type CBuildConfiguration", + cBuildConfiguration instanceof CBuildConfiguration); + CBuildConfiguration cbc = (CBuildConfiguration) cBuildConfiguration; + // Set this ICBuildConfiguration as the active build configuration + cbc.setActive(new NullProgressMonitor()); + + // (4) The project's scannerInfoProvider is expected to be the correct type here + scannerInfoProvider = CCorePlugin.getDefault().getScannerInfoProvider(project); + assertThat("scannerInfoProvider expected to be ICBuildConfiguration", + scannerInfoProvider instanceof ICBuildConfiguration); + } + + private IProject createCMakeProject() throws Exception { + // Create a plain Eclipse project + IProject project = ResourceHelper.createProject(this.getName()); + // Add C/C++ and CMake natures to make it a CMake project + IProjectDescription description = project.getDescription(); + description.setNatureIds( + new String[] { CProjectNature.C_NATURE_ID, CCProjectNature.CC_NATURE_ID, CMakeNature.ID }); + project.setDescription(description, null); + return project; + } +} diff --git a/core/org.eclipse.cdt.core.tests/pom.xml b/core/org.eclipse.cdt.core.tests/pom.xml index 7f418ac41bc..15ddfe51f09 100644 --- a/core/org.eclipse.cdt.core.tests/pom.xml +++ b/core/org.eclipse.cdt.core.tests/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/core/org.eclipse.cdt.core.win32.x86_64/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.win32.x86_64/META-INF/MANIFEST.MF index 0d01378a4f6..ae8b80985a5 100644 --- a/core/org.eclipse.cdt.core.win32.x86_64/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.win32.x86_64/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.win32.x86_64 Bundle-SymbolicName: org.eclipse.cdt.core.win32.x86_64;singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Fragment-Host: org.eclipse.cdt.core.native;bundle-version="[6.3.0,7.0.0)" Eclipse-PlatformFilter: (&(osgi.os=win32)(osgi.arch=x86_64)) Bundle-Vendor: %providerName diff --git a/core/org.eclipse.cdt.core.win32.x86_64/pom.xml b/core/org.eclipse.cdt.core.win32.x86_64/pom.xml index f442aacd20c..e2fc213ffdf 100644 --- a/core/org.eclipse.cdt.core.win32.x86_64/pom.xml +++ b/core/org.eclipse.cdt.core.win32.x86_64/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.core.win32.x86_64 eclipse-plugin diff --git a/core/org.eclipse.cdt.core.win32/pom.xml b/core/org.eclipse.cdt.core.win32/pom.xml index 64c3fdf659e..67b8877d3d6 100644 --- a/core/org.eclipse.cdt.core.win32/pom.xml +++ b/core/org.eclipse.cdt.core.win32/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF index 45992d412c8..7c08f8970bc 100644 --- a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true -Bundle-Version: 8.4.200.qualifier +Bundle-Version: 8.4.201.qualifier Bundle-Activator: org.eclipse.cdt.core.CCorePlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/build/CBuildConfigurationManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/build/CBuildConfigurationManager.java index b5a1f26e01b..40504459e6d 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/build/CBuildConfigurationManager.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/build/CBuildConfigurationManager.java @@ -320,7 +320,16 @@ public ICBuildConfiguration getBuildConfiguration(IProject project, IToolChain t ICBuildConfigurationProvider provider = getProvider(project); if (provider != null) { // The provider will call us back to add in the new one - return provider.createBuildConfiguration(project, toolChain, launchMode, monitor); + ICBuildConfiguration cconfig = provider.createBuildConfiguration(project, toolChain, launchMode, monitor); + if (cconfig != null) { + /* + * The IScannerInfoProvider may be cached with an incorrect value if the ICBuildConfiguration is not + * available at the time it is checked. Now that one has been created, the previous value should be + * forgotten so the new cconfig can be used. + */ + CCorePlugin.getDefault().resetCachedScannerInfoProvider(project); + } + return cconfig; } else { return null; } diff --git a/core/org.eclipse.cdt.ui.tests/pom.xml b/core/org.eclipse.cdt.ui.tests/pom.xml index e9a6a0f0be9..fd5383d238d 100644 --- a/core/org.eclipse.cdt.ui.tests/pom.xml +++ b/core/org.eclipse.cdt.ui.tests/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/core/pom.xml b/core/pom.xml index f5da66f6b5f..7ca04409670 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt-parent diff --git a/cross/org.eclipse.cdt.build.crossgcc-feature/feature.xml b/cross/org.eclipse.cdt.build.crossgcc-feature/feature.xml index df3c42776fe..9d87bc9972d 100644 --- a/cross/org.eclipse.cdt.build.crossgcc-feature/feature.xml +++ b/cross/org.eclipse.cdt.build.crossgcc-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/cross/org.eclipse.cdt.launch.remote-feature/feature.xml b/cross/org.eclipse.cdt.launch.remote-feature/feature.xml index d9bafd63e49..418ba7bcacc 100644 --- a/cross/org.eclipse.cdt.launch.remote-feature/feature.xml +++ b/cross/org.eclipse.cdt.launch.remote-feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/cross/org.eclipse.cdt.launch.remote-feature/pom.xml b/cross/org.eclipse.cdt.launch.remote-feature/pom.xml index 57507da7f15..6db1025a2de 100644 --- a/cross/org.eclipse.cdt.launch.remote-feature/pom.xml +++ b/cross/org.eclipse.cdt.launch.remote-feature/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/cross/org.eclipse.cdt.launch.serial-feature/feature.xml b/cross/org.eclipse.cdt.launch.serial-feature/feature.xml index de735a8bab1..116aca420c6 100644 --- a/cross/org.eclipse.cdt.launch.serial-feature/feature.xml +++ b/cross/org.eclipse.cdt.launch.serial-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.cross-parent diff --git a/debug/org.eclipse.cdt.debug.application.product/debug.product b/debug/org.eclipse.cdt.debug.application.product/debug.product index 642acb19953..bd205d70a2d 100644 --- a/debug/org.eclipse.cdt.debug.application.product/debug.product +++ b/debug/org.eclipse.cdt.debug.application.product/debug.product @@ -11,7 +11,7 @@ SPDX-License-Identifier: EPL-2.0 --> - + diff --git a/debug/org.eclipse.cdt.debug.application.product/pom.xml b/debug/org.eclipse.cdt.debug.application.product/pom.xml index 83e6e7d89ed..e3512a2befd 100644 --- a/debug/org.eclipse.cdt.debug.application.product/pom.xml +++ b/debug/org.eclipse.cdt.debug.application.product/pom.xml @@ -20,7 +20,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/debug/org.eclipse.cdt.debug.application.tests/pom.xml b/debug/org.eclipse.cdt.debug.application.tests/pom.xml index 62f0972863c..a222930d9aa 100644 --- a/debug/org.eclipse.cdt.debug.application.tests/pom.xml +++ b/debug/org.eclipse.cdt.debug.application.tests/pom.xml @@ -16,7 +16,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF index 33b9f0a2129..348fe9ef82d 100644 --- a/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF +++ b/debug/org.eclipse.cdt.debug.application/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-SymbolicName: org.eclipse.cdt.debug.application;singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Activator: org.eclipse.cdt.debug.application.Activator Bundle-Vendor: %provider Require-Bundle: org.eclipse.ui, diff --git a/debug/org.eclipse.cdt.debug.application/plugin.properties b/debug/org.eclipse.cdt.debug.application/plugin.properties index 61ced37d87d..f5ff22ad8ae 100644 --- a/debug/org.eclipse.cdt.debug.application/plugin.properties +++ b/debug/org.eclipse.cdt.debug.application/plugin.properties @@ -41,6 +41,6 @@ DebugRemoteExecutableMenu.label=&Remote Executable... DebugCore.description=Debug a corefile DebugCore.name=Debug Core File DebugCoreMenu.label=Debug &Core File... -aboutText=Eclipse Stand-alone C/C++ GDB Graphical Debugger\n\nRelease 11.6.0\n +aboutText=Eclipse Stand-alone C/C++ GDB Graphical Debugger\n\nRelease 11.6.1\n ProductDesc=Eclipse Stand-alone C/C++ GDB Debugger ProductName=Stand-alone C/C++ GDB Debugger diff --git a/debug/org.eclipse.cdt.debug.standalone-feature/feature.xml b/debug/org.eclipse.cdt.debug.standalone-feature/feature.xml index c1af9f352e8..d0851317370 100644 --- a/debug/org.eclipse.cdt.debug.standalone-feature/feature.xml +++ b/debug/org.eclipse.cdt.debug.standalone-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/debug/org.eclipse.cdt.gnu.debug-feature/feature.xml b/debug/org.eclipse.cdt.gnu.debug-feature/feature.xml index 5977e1de41b..0145bc4f70c 100644 --- a/debug/org.eclipse.cdt.gnu.debug-feature/feature.xml +++ b/debug/org.eclipse.cdt.gnu.debug-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.debug-parent diff --git a/doc/org.eclipse.cdt.doc.isv/META-INF/MANIFEST.MF b/doc/org.eclipse.cdt.doc.isv/META-INF/MANIFEST.MF index 19afc327440..8f3d7a6e7ee 100644 --- a/doc/org.eclipse.cdt.doc.isv/META-INF/MANIFEST.MF +++ b/doc/org.eclipse.cdt.doc.isv/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.doc.isv; singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Localization: plugin Require-Bundle: org.eclipse.help;bundle-version="[3.2.0,4.0.0)" Bundle-ActivationPolicy: lazy diff --git a/doc/org.eclipse.cdt.doc.isv/pom.xml b/doc/org.eclipse.cdt.doc.isv/pom.xml index 15b596f93dc..affedf3c6f8 100644 --- a/doc/org.eclipse.cdt.doc.isv/pom.xml +++ b/doc/org.eclipse.cdt.doc.isv/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.doc.isv eclipse-plugin @@ -121,7 +121,7 @@ -linkoffline ../../org.eclipse.platform.doc.isv/reference/api -public - -header "Eclipse CDT 11.6.0" + -header "Eclipse CDT 11.6.1" -bottom "Copyright (c) IBM Corp. and others 2004, 2021. All Rights Reserved." -tag 'noimplement:a:Restriction:' diff --git a/doc/org.eclipse.cdt.doc.user/META-INF/MANIFEST.MF b/doc/org.eclipse.cdt.doc.user/META-INF/MANIFEST.MF index ae4cf6d9876..42174a45d84 100644 --- a/doc/org.eclipse.cdt.doc.user/META-INF/MANIFEST.MF +++ b/doc/org.eclipse.cdt.doc.user/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.doc.user; singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-ActivationPolicy: lazy diff --git a/doc/org.eclipse.cdt.doc.user/pom.xml b/doc/org.eclipse.cdt.doc.user/pom.xml index 0b59c39350c..2ed716acad4 100644 --- a/doc/org.eclipse.cdt.doc.user/pom.xml +++ b/doc/org.eclipse.cdt.doc.user/pom.xml @@ -16,11 +16,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.doc.user eclipse-plugin diff --git a/docker/build-images.sh b/docker/build-images.sh index dcf8952c143..bb299e00039 100755 --- a/docker/build-images.sh +++ b/docker/build-images.sh @@ -14,3 +14,4 @@ docker build --rm -f cdt-infra-base/ubuntu-18.04/Dockerfile -t cdt-infra-base:ub docker build --rm -f cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile -t cdt-infra-all-gdbs:ubuntu-18.04 . docker build --rm -f cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile -t cdt-infra-eclipse-full:ubuntu-18.04 . docker build --rm -f cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install:ubuntu-18.04 . +docker build --rm -f cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install-github:ubuntu-18.04 . diff --git a/docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile b/docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile index b2bf5ff6886..fa086a89dd5 100644 --- a/docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile +++ b/docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile @@ -26,6 +26,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libxml2-utils \ gettext-base \ xserver-xephyr \ + clang-format \ + xvfb \ + ssh-askpass \ && apt-get install -y llvm \ && apt-get install -y --no-install-recommends texinfo bison flex \ && rm -rf /var/lib/apt/lists/* \ diff --git a/docker/cdt-infra-plus-eclipse-install-github/Readme.md b/docker/cdt-infra-plus-eclipse-install-github/Readme.md new file mode 100644 index 00000000000..f5d1ee9fbca --- /dev/null +++ b/docker/cdt-infra-plus-eclipse-install-github/Readme.md @@ -0,0 +1 @@ +This directory contains dockerfiles for complete CDT Infra + Eclipse Installations for running on GitHub Actions diff --git a/docker/cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile b/docker/cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile new file mode 100644 index 00000000000..ae6c9688047 --- /dev/null +++ b/docker/cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:18.04 + +# The contents of this file are similar to cdt-infra-plus-eclipse-install/*/Dockerfile +# because we don't want to share layers otherwise the change in permissions (1000 -> 1001) +# causes an additional layer to be created in Docker, adding 300MB+ to download +# size on each run + +ENV HOME=/home/vnc +RUN apt-get update +RUN apt-get install -y curl tar gzip +#Eclipse SDK & Fix permissions for GitHub Actions +RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \ + && curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xvz \ + && mv eclipse eclipse-SDK-4.31 \ + && chown -R 1001:0 ${HOME} \ + && chmod -R g+rwX ${HOME} + +FROM cdt-infra-eclipse-full:ubuntu-18.04 +USER root + +COPY --from=0 ${HOME}/buildtools ${HOME}/buildtools + +USER 1001 + +CMD ["/bin/bash"] diff --git a/docker/cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile b/docker/cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile index 12925cf13e5..4588eaeabe0 100644 --- a/docker/cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile +++ b/docker/cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile @@ -5,8 +5,6 @@ RUN apt-get update RUN apt-get install -y curl tar gzip #Eclipse SDK & Fix permissions for OpenShift & standard k8s RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \ - && curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/eclipse-SDK-4.23-linux-gtk-x86_64.tar.gz | tar xvz \ - && mv eclipse eclipse-SDK-4.23 \ && curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xvz \ && mv eclipse eclipse-SDK-4.31 \ && chown -R 1000:0 ${HOME} \ @@ -16,11 +14,6 @@ FROM cdt-infra-eclipse-full:ubuntu-18.04 USER root COPY --from=0 ${HOME}/buildtools ${HOME}/buildtools -RUN apt-get update \ - && apt-get install -y clang-format \ - && rm -rf /var/lib/apt/lists/* -RUN apt-get update -RUN apt-get install -y ssh-askpass USER 1000 diff --git a/docker/deploy-images.sh b/docker/deploy-images.sh index f3a606c08b9..69b94f16f3b 100755 --- a/docker/deploy-images.sh +++ b/docker/deploy-images.sh @@ -11,7 +11,7 @@ namespace=${1:-quay.io/eclipse-cdt} shorthash=$(git rev-parse --short HEAD) toplevel=$(git rev-parse --show-toplevel) -images="cdt-infra-eclipse-full:ubuntu-18.04 cdt-infra-plus-eclipse-install:ubuntu-18.04" +images="cdt-infra-eclipse-full:ubuntu-18.04 cdt-infra-plus-eclipse-install:ubuntu-18.04 cdt-infra-plus-eclipse-install-github:ubuntu-18.04" $toplevel/docker/build-images.sh @@ -28,7 +28,7 @@ for image in $images; do hashname=$(docker inspect --format='{{index .RepoDigests 0}}' $image) echo $image "-->" $hashname nameonly=$(echo $image | sed -es,:.*,,) - find $toplevel -name \*\.Jenkinsfile -or -name \*\.yaml | while read file; do + find $toplevel -name \*\.Jenkinsfile -or -name \*\.yaml -or -name \*\.yml | while read file; do sed -i "s#image: $namespace/$nameonly[:@].*#image: $hashname#" $file git add $file done diff --git a/dsf-gdb/org.eclipse.cdt.gnu.dsf-feature/feature.xml b/dsf-gdb/org.eclipse.cdt.gnu.dsf-feature/feature.xml index 0602c58c832..9ca4691bb45 100644 --- a/dsf-gdb/org.eclipse.cdt.gnu.dsf-feature/feature.xml +++ b/dsf-gdb/org.eclipse.cdt.gnu.dsf-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/dsf-gdb/pom.xml b/dsf-gdb/pom.xml index c786564d2b0..279a5dd3ec2 100644 --- a/dsf-gdb/pom.xml +++ b/dsf-gdb/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.dsf-gdb-parent diff --git a/dsf/org.eclipse.cdt.examples.dsf-feature/feature.xml b/dsf/org.eclipse.cdt.examples.dsf-feature/feature.xml index 6300ac7e100..717d6dd3fb4 100644 --- a/dsf/org.eclipse.cdt.examples.dsf-feature/feature.xml +++ b/dsf/org.eclipse.cdt.examples.dsf-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/dsf/pom.xml b/dsf/pom.xml index 2fa70ca2845..3eec5c98ce3 100644 --- a/dsf/pom.xml +++ b/dsf/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.dsf-parent diff --git a/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml b/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml index daf4db4d6ec..d2219f58aee 100644 --- a/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml +++ b/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml @@ -3,7 +3,7 @@ kind: Pod spec: containers: - name: cdt - image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install@sha256:7146f40a39f75e364c473aa26044803582428f41f1f911e4b44a8ee8e72f89d1 + image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install@sha256:34d46fc15cdade4f103d3f1043c48441d41b532545e6b9083c17f5db0175bbab tty: true args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"] resources: diff --git a/jenkins/pod-templates/cdt-full-pod-small.yaml b/jenkins/pod-templates/cdt-full-pod-small.yaml index e51a328841f..9eb8fec305a 100644 --- a/jenkins/pod-templates/cdt-full-pod-small.yaml +++ b/jenkins/pod-templates/cdt-full-pod-small.yaml @@ -3,7 +3,7 @@ kind: Pod spec: containers: - name: cdt - image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:4ec937663ffab34e0d91aadd0290cbf8af7adc068e11f135c1aa77cdf63d9056 + image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0 tty: true args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"] resources: diff --git a/jenkins/pod-templates/cdt-full-pod-standard.yaml b/jenkins/pod-templates/cdt-full-pod-standard.yaml index 3efdedf8fc2..b93b3d58c4f 100644 --- a/jenkins/pod-templates/cdt-full-pod-standard.yaml +++ b/jenkins/pod-templates/cdt-full-pod-standard.yaml @@ -3,7 +3,7 @@ kind: Pod spec: containers: - name: cdt - image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:4ec937663ffab34e0d91aadd0290cbf8af7adc068e11f135c1aa77cdf63d9056 + image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0 tty: true args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"] resources: diff --git a/jsoncdb/aggregator/pom.xml b/jsoncdb/aggregator/pom.xml index a82e5e9f27e..3faf18fa266 100644 --- a/jsoncdb/aggregator/pom.xml +++ b/jsoncdb/aggregator/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt jsoncdb-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT jsoncdb-aggregator diff --git a/jsoncdb/org.eclipse.cdt.jsoncdb.freescale/META-INF/MANIFEST.MF b/jsoncdb/org.eclipse.cdt.jsoncdb.freescale/META-INF/MANIFEST.MF index 0a4cacd13e7..444d6c9c1bf 100644 --- a/jsoncdb/org.eclipse.cdt.jsoncdb.freescale/META-INF/MANIFEST.MF +++ b/jsoncdb/org.eclipse.cdt.jsoncdb.freescale/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-Copyright: %Bundle-Copyright Bundle-SymbolicName: org.eclipse.cdt.jsoncdb.freescale;singleton:=true -Bundle-Version: 1.0.100.qualifier +Bundle-Version: 1.0.101.qualifier Bundle-Localization: plugin Require-Bundle: org.eclipse.cdt.jsoncdb.core;bundle-version="1.4.100", org.eclipse.help;bundle-version="3.10.100", diff --git a/jsoncdb/pom.xml b/jsoncdb/pom.xml index d7f608cf6e0..f9b17b8e704 100644 --- a/jsoncdb/pom.xml +++ b/jsoncdb/pom.xml @@ -17,12 +17,12 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt jsoncdb-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT pom diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag-feature/feature.xml b/jtag/org.eclipse.cdt.debug.gdbjtag-feature/feature.xml index 0e2fd854223..80acdf56514 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag-feature/feature.xml +++ b/jtag/org.eclipse.cdt.debug.gdbjtag-feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag-feature/pom.xml b/jtag/org.eclipse.cdt.debug.gdbjtag-feature/pom.xml index ba2669759b1..838616960fd 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag-feature/pom.xml +++ b/jtag/org.eclipse.cdt.debug.gdbjtag-feature/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/pom.xml b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/pom.xml index f4ab08c99e3..43289bfc64b 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/pom.xml +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag/pom.xml b/jtag/org.eclipse.cdt.debug.gdbjtag/pom.xml index 94e3c183e0a..4a34e61db87 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag/pom.xml +++ b/jtag/org.eclipse.cdt.debug.gdbjtag/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/jtag/pom.xml b/jtag/pom.xml index 39f758fbca9..b3a35772e76 100644 --- a/jtag/pom.xml +++ b/jtag/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.jtag-parent diff --git a/launch/org.eclipse.cdt.docker.launcher-feature/feature.xml b/launch/org.eclipse.cdt.docker.launcher-feature/feature.xml index d1c6066f72b..8c79ccf9d20 100644 --- a/launch/org.eclipse.cdt.docker.launcher-feature/feature.xml +++ b/launch/org.eclipse.cdt.docker.launcher-feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/launch/org.eclipse.cdt.docker.launcher-feature/pom.xml b/launch/org.eclipse.cdt.docker.launcher-feature/pom.xml index 7cf6984870b..7aa92b03587 100644 --- a/launch/org.eclipse.cdt.docker.launcher-feature/pom.xml +++ b/launch/org.eclipse.cdt.docker.launcher-feature/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.xml b/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.xml index dcd940f81c5..8f14759628a 100644 --- a/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.xml +++ b/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/launch/org.eclipse.cdt.flatpak.launcher-feature/pom.xml b/launch/org.eclipse.cdt.flatpak.launcher-feature/pom.xml index 5ff9fa241a6..9c4546c6a55 100644 --- a/launch/org.eclipse.cdt.flatpak.launcher-feature/pom.xml +++ b/launch/org.eclipse.cdt.flatpak.launcher-feature/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/launch/pom.xml b/launch/pom.xml index 28f84bde63d..7cf8b712052 100644 --- a/launch/pom.xml +++ b/launch/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.launch-parent diff --git a/launchbar/org.eclipse.launchbar.remote/feature.xml b/launchbar/org.eclipse.launchbar.remote/feature.xml index f5bd853e089..4ea0a701640 100644 --- a/launchbar/org.eclipse.launchbar.remote/feature.xml +++ b/launchbar/org.eclipse.launchbar.remote/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/launchbar/org.eclipse.launchbar/feature.xml b/launchbar/org.eclipse.launchbar/feature.xml index 6566ac9c6db..9f92140bb37 100644 --- a/launchbar/org.eclipse.launchbar/feature.xml +++ b/launchbar/org.eclipse.launchbar/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.launchbar-parent diff --git a/llvm/org.eclipse.cdt.llvm.dsf.lldb-feature/feature.xml b/llvm/org.eclipse.cdt.llvm.dsf.lldb-feature/feature.xml index dbc7cc02797..158138cb1e9 100644 --- a/llvm/org.eclipse.cdt.llvm.dsf.lldb-feature/feature.xml +++ b/llvm/org.eclipse.cdt.llvm.dsf.lldb-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.llvm-parent diff --git a/memory/org.eclipse.cdt.debug.ui.memory-feature/feature.xml b/memory/org.eclipse.cdt.debug.ui.memory-feature/feature.xml index 883063331b1..5b0062110c7 100644 --- a/memory/org.eclipse.cdt.debug.ui.memory-feature/feature.xml +++ b/memory/org.eclipse.cdt.debug.ui.memory-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.memory-parent diff --git a/native/org.eclipse.cdt.native.serial/META-INF/MANIFEST.MF b/native/org.eclipse.cdt.native.serial/META-INF/MANIFEST.MF index 11df5f9ab4e..31eeceb9416 100644 --- a/native/org.eclipse.cdt.native.serial/META-INF/MANIFEST.MF +++ b/native/org.eclipse.cdt.native.serial/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.native.serial -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %providerName Bundle-RequiredExecutionEnvironment: JavaSE-17 Export-Package: org.eclipse.cdt.serial diff --git a/native/org.eclipse.cdt.native.serial/pom.xml b/native/org.eclipse.cdt.native.serial/pom.xml index 91c47eec41d..51e596439ef 100644 --- a/native/org.eclipse.cdt.native.serial/pom.xml +++ b/native/org.eclipse.cdt.native.serial/pom.xml @@ -19,11 +19,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.native.serial eclipse-plugin diff --git a/native/pom.xml b/native/pom.xml index c29c2658a6a..c43926ebbfd 100644 --- a/native/pom.xml +++ b/native/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.native-parent diff --git a/pom.xml b/pom.xml index 22eb8f78d01..bf27eece664 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT pom CDT Parent @@ -25,8 +25,8 @@ 4.0.6 1.4.3 jacoco - https://ci.eclipse.org/cdt/job/cdt/job/main/lastSuccessfulBuild/artifact/releng/org.eclipse.cdt.repo/target/repository - https://download.eclipse.org/staging/2024-06/ + https://ci.eclipse.org/cdt/job/cdt/job/cdt_11_6/lastSuccessfulBuild/artifact/releng/org.eclipse.cdt.repo/target/repository + https://download.eclipse.org/releases/2024-06// tools/cdt/builds/master/nightly reuseReports ${project.basedir}/../../target/jacoco.exec @@ -40,9 +40,9 @@ scm:git:https://github.com/eclipse-cdt/cdt -Xms256m -Xmx512m -ea --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED - https://download.eclipse.org/tools/cdt/builds/11.5/cdt-11.5.0-rc2/ - https://download.eclipse.org/tools/cdt/builds/11.5/cdt-11.5.0-rc2/ - https://download.eclipse.org/releases/2024-03/ + https://download.eclipse.org/tools/cdt/releases/11.6/ + https://download.eclipse.org/tools/cdt/releases/11.6/ + https://download.eclipse.org/releases/2024-06/ - + - + diff --git a/releng/org.eclipse.cdt.testing-feature/feature.xml b/releng/org.eclipse.cdt.testing-feature/feature.xml index dfdb6c02fad..1bf695ee384 100644 --- a/releng/org.eclipse.cdt.testing-feature/feature.xml +++ b/releng/org.eclipse.cdt.testing-feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/releng/org.eclipse.cdt.testing-feature/pom.xml b/releng/org.eclipse.cdt.testing-feature/pom.xml index 539e8ffda1b..a7e1a4c4dd4 100644 --- a/releng/org.eclipse.cdt.testing-feature/pom.xml +++ b/releng/org.eclipse.cdt.testing-feature/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/releng/org.eclipse.cdt.testing.repo/pom.xml b/releng/org.eclipse.cdt.testing.repo/pom.xml index 22024d0dd8c..5dc4dfcdbf4 100644 --- a/releng/org.eclipse.cdt.testing.repo/pom.xml +++ b/releng/org.eclipse.cdt.testing.repo/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/releng/org.eclipse.cdt.testing/pom.xml b/releng/org.eclipse.cdt.testing/pom.xml index 766a9764e1a..6bd905dc0b4 100644 --- a/releng/org.eclipse.cdt.testing/pom.xml +++ b/releng/org.eclipse.cdt.testing/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/releng/org.eclipse.cdt/META-INF/MANIFEST.MF b/releng/org.eclipse.cdt/META-INF/MANIFEST.MF index 493f5210599..8142213cc5a 100644 --- a/releng/org.eclipse.cdt/META-INF/MANIFEST.MF +++ b/releng/org.eclipse.cdt/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt; singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Require-Bundle: org.eclipse.ui.intro;bundle-version="[3.2.0,4.0.0)", diff --git a/releng/org.eclipse.cdt/pom.xml b/releng/org.eclipse.cdt/pom.xml index d6f5871ce79..9d4ac60276c 100644 --- a/releng/org.eclipse.cdt/pom.xml +++ b/releng/org.eclipse.cdt/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/releng/pom.xml b/releng/pom.xml index 3982d2babf5..30774be0cba 100644 --- a/releng/pom.xml +++ b/releng/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.releng-parent diff --git a/remote/org.eclipse.remote-feature/feature.xml b/remote/org.eclipse.remote-feature/feature.xml index ce60e6b92c3..2b8ec0848de 100644 --- a/remote/org.eclipse.remote-feature/feature.xml +++ b/remote/org.eclipse.remote-feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/remote/org.eclipse.remote.doc.isv/META-INF/MANIFEST.MF b/remote/org.eclipse.remote.doc.isv/META-INF/MANIFEST.MF index 592066fa565..5bc339499ae 100644 --- a/remote/org.eclipse.remote.doc.isv/META-INF/MANIFEST.MF +++ b/remote/org.eclipse.remote.doc.isv/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Eclipse Remote Development documentation plug-in Bundle-SymbolicName: org.eclipse.remote.doc.isv;singleton:=true -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: Eclipse PTP Require-Bundle: org.eclipse.remote.console, org.eclipse.remote.core, diff --git a/remote/org.eclipse.remote.doc.isv/pom.xml b/remote/org.eclipse.remote.doc.isv/pom.xml index 9b1719866cd..90f5855ee54 100644 --- a/remote/org.eclipse.remote.doc.isv/pom.xml +++ b/remote/org.eclipse.remote.doc.isv/pom.xml @@ -6,11 +6,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.remote.doc.isv eclipse-plugin @@ -75,7 +75,7 @@ -linkoffline ../../org.eclipse.platform.doc.isv/reference/api -public - -header "Eclipse CDT's org.eclipse.remote 11.6.0" + -header "Eclipse CDT's org.eclipse.remote 11.6.1" -bottom "Copyright (c) IBM Corp. and others 2004, 2021. All Rights Reserved." -tag 'noimplement:a:Restriction:' diff --git a/remote/org.eclipse.remote.proxy-feature/feature.xml b/remote/org.eclipse.remote.proxy-feature/feature.xml index e4fe7c57e65..0c2befce67e 100644 --- a/remote/org.eclipse.remote.proxy-feature/feature.xml +++ b/remote/org.eclipse.remote.proxy-feature/feature.xml @@ -2,7 +2,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.remote.proxy.server.linux.ppc64le eclipse-plugin diff --git a/remote/org.eclipse.remote.proxy.server.linux.x86_64/META-INF/MANIFEST.MF b/remote/org.eclipse.remote.proxy.server.linux.x86_64/META-INF/MANIFEST.MF index 5de3a7db2b0..4c6856c5aac 100644 --- a/remote/org.eclipse.remote.proxy.server.linux.x86_64/META-INF/MANIFEST.MF +++ b/remote/org.eclipse.remote.proxy.server.linux.x86_64/META-INF/MANIFEST.MF @@ -2,6 +2,6 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.remote.proxy.server.linux.x86_64 -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %pluginProvider Bundle-Localization: plugin diff --git a/remote/org.eclipse.remote.proxy.server.linux.x86_64/pom.xml b/remote/org.eclipse.remote.proxy.server.linux.x86_64/pom.xml index a6854db6346..3e1f1b33692 100644 --- a/remote/org.eclipse.remote.proxy.server.linux.x86_64/pom.xml +++ b/remote/org.eclipse.remote.proxy.server.linux.x86_64/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.remote.proxy.server.linux.x86_64 eclipse-plugin diff --git a/remote/org.eclipse.remote.proxy.server.macosx.x86_64/META-INF/MANIFEST.MF b/remote/org.eclipse.remote.proxy.server.macosx.x86_64/META-INF/MANIFEST.MF index 7c787bd1125..77674101266 100644 --- a/remote/org.eclipse.remote.proxy.server.macosx.x86_64/META-INF/MANIFEST.MF +++ b/remote/org.eclipse.remote.proxy.server.macosx.x86_64/META-INF/MANIFEST.MF @@ -2,6 +2,6 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.remote.proxy.server.macosx.x86_64 -Bundle-Version: 11.6.0.qualifier +Bundle-Version: 11.6.1.qualifier Bundle-Vendor: %pluginProvider Bundle-Localization: plugin diff --git a/remote/org.eclipse.remote.proxy.server.macosx.x86_64/pom.xml b/remote/org.eclipse.remote.proxy.server.macosx.x86_64/pom.xml index 3b866d48a18..721a0437b02 100644 --- a/remote/org.eclipse.remote.proxy.server.macosx.x86_64/pom.xml +++ b/remote/org.eclipse.remote.proxy.server.macosx.x86_64/pom.xml @@ -17,11 +17,11 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.remote.proxy.server.macosx.x86_64 eclipse-plugin diff --git a/remote/org.eclipse.remote.proxy.server.product/pom.xml b/remote/org.eclipse.remote.proxy.server.product/pom.xml index 6b50402bb19..4efdf3141f6 100644 --- a/remote/org.eclipse.remote.proxy.server.product/pom.xml +++ b/remote/org.eclipse.remote.proxy.server.product/pom.xml @@ -6,7 +6,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/remote/org.eclipse.remote.serial-feature/feature.xml b/remote/org.eclipse.remote.serial-feature/feature.xml index 158c1b17aef..a5b8e33f426 100644 --- a/remote/org.eclipse.remote.serial-feature/feature.xml +++ b/remote/org.eclipse.remote.serial-feature/feature.xml @@ -2,7 +2,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.remote-parent diff --git a/terminal/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.xml b/terminal/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.xml index 5ce27d4c8f5..bc6c55869f2 100644 --- a/terminal/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.xml +++ b/terminal/features/org.eclipse.tm.terminal.connector.cdtserial.feature/feature.xml @@ -15,7 +15,7 @@ diff --git a/terminal/features/org.eclipse.tm.terminal.connector.local.feature/feature.xml b/terminal/features/org.eclipse.tm.terminal.connector.local.feature/feature.xml index 21a658563f4..2461a285179 100644 --- a/terminal/features/org.eclipse.tm.terminal.connector.local.feature/feature.xml +++ b/terminal/features/org.eclipse.tm.terminal.connector.local.feature/feature.xml @@ -14,7 +14,7 @@ diff --git a/terminal/features/org.eclipse.tm.terminal.connector.remote.feature/feature.xml b/terminal/features/org.eclipse.tm.terminal.connector.remote.feature/feature.xml index 3a637d3fc94..e9d92980ed8 100644 --- a/terminal/features/org.eclipse.tm.terminal.connector.remote.feature/feature.xml +++ b/terminal/features/org.eclipse.tm.terminal.connector.remote.feature/feature.xml @@ -14,7 +14,7 @@ diff --git a/terminal/features/org.eclipse.tm.terminal.connector.ssh.feature/feature.xml b/terminal/features/org.eclipse.tm.terminal.connector.ssh.feature/feature.xml index 76483a9891d..9c78f4d1c48 100644 --- a/terminal/features/org.eclipse.tm.terminal.connector.ssh.feature/feature.xml +++ b/terminal/features/org.eclipse.tm.terminal.connector.ssh.feature/feature.xml @@ -15,7 +15,7 @@ diff --git a/terminal/features/org.eclipse.tm.terminal.control.feature/feature.xml b/terminal/features/org.eclipse.tm.terminal.control.feature/feature.xml index 62a219d23dd..825fd4d8d78 100644 --- a/terminal/features/org.eclipse.tm.terminal.control.feature/feature.xml +++ b/terminal/features/org.eclipse.tm.terminal.control.feature/feature.xml @@ -16,7 +16,7 @@ org.eclipse.cdt terminal-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.tm.terminal.features diff --git a/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF b/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF index f208d8ece0e..e8f9acf6226 100644 --- a/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF +++ b/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.tm.terminal.control; singleton:=true -Bundle-Version: 5.5.300.qualifier +Bundle-Version: 5.5.301.qualifier Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java b/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java index af7eadd8254..e75a0f6d75d 100644 --- a/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java +++ b/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java @@ -97,6 +97,12 @@ public class VT100Emulator implements ControlListener { */ private static final int ANSISTATE_EXPECTING_CHARSET_DESIGNATION = 5; + /** + * For cases where the OSC (OS Command) ends with a multi-byte ST (i.e. ESC \) + * we use this extra state. + */ + private static final int ANSISTATE_EXPECTING_OS_COMMAND_END = 6; + /** * This field holds the current state of the Finite TerminalState Automaton (FSA) * that recognizes ANSI escape sequences. @@ -428,16 +434,27 @@ private void processNewText() throws IOException { break; case ANSISTATE_EXPECTING_OS_COMMAND: - // A BEL (\u0007) character marks the end of the OSC sequence. + // A BEL (\u0007) or ESC \ ('\e\\') character marks the end of the OSC sequence. if (character == '\u0007') { ansiState = ANSISTATE_INITIAL; processAnsiOsCommand(); + } else if (character == '\u001b') { + ansiState = ANSISTATE_EXPECTING_OS_COMMAND_END; } else { ansiOsCommand.append(character); } break; + case ANSISTATE_EXPECTING_OS_COMMAND_END: + ansiState = ANSISTATE_INITIAL; + if (character == '\\') { + processAnsiOsCommand(); + } else { + Logger.log("Unsupported escape sequence: escape '" + ansiOsCommand + " \\e" + character + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + break; + case ANSISTATE_EXPECTING_DEC_PRIVATE_COMMAND: // Parameters can appear after the '[?' in an escape sequence, but they // are optional. diff --git a/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java b/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java index b32128bf928..66aa5941f0c 100644 --- a/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java +++ b/terminal/plugins/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorTest.java @@ -37,10 +37,18 @@ public class VT100EmulatorTest { private static final String CLEAR_ENTIRE_SCREEN = "\033[2J"; private static final String SCROLL_REVERSE = "\033M"; - private static String TITLE(String title) { + private static String TITLE_ST_BEL(String title) { return "\033]0;" + title + "\007"; } + private static String TITLE_ST_ESC_BACKSLASH(String title) { + return "\033]0;" + title + "\033\\"; + } + + private static String TITLE(String title) { + return TITLE_ST_BEL(title); + } + private static String SCROLL_REGION(int startRow, int endRow) { return "\033[" + startRow + ";" + endRow + "r"; } @@ -340,4 +348,31 @@ public void testScrollReverseScrollingRegion() { assertAll(() -> assertCursorLocation(2, expected.get(2).length()), () -> assertTextEquals(expected)); } + @Test + public void testStringTerminator() { + run( // + TITLE_ST_BEL("TITLE1"), // + "HELLO1", // + TITLE_ST_ESC_BACKSLASH("TITLE2"), // + "HELLO2", // + TITLE_ST_BEL("TITLE3"), // + "HELLO3", // + TITLE_ST_ESC_BACKSLASH("TITLE4") // + ); + assertAll(() -> assertTextEquals("HELLO1HELLO2HELLO3"), + () -> assertEquals(List.of("TITLE1", "TITLE2", "TITLE3", "TITLE4"), control.getAllTitles())); + } + + @Test + public void testMalformedStringTerminator() { + run( // + TITLE_ST_ESC_BACKSLASH("TITLE1"), // + "\033]0;" + "TITLE1" + "\033X", // + TITLE_ST_ESC_BACKSLASH("TITLE2"), // + "HELLO" // + ); + assertAll(() -> assertTextEquals("HELLO"), + () -> assertEquals(List.of("TITLE1", "TITLE2"), control.getAllTitles())); + } + } diff --git a/terminal/plugins/pom.xml b/terminal/plugins/pom.xml index c2bd41cf3ab..05a57ef6401 100644 --- a/terminal/plugins/pom.xml +++ b/terminal/plugins/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt terminal-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.tm.terminal.plugins diff --git a/terminal/pom.xml b/terminal/pom.xml index 3728c753e8a..746a165a3b7 100644 --- a/terminal/pom.xml +++ b/terminal/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT terminal-parent diff --git a/terminal/repo/pom.xml b/terminal/repo/pom.xml index 02022060409..ced96198322 100644 --- a/terminal/repo/pom.xml +++ b/terminal/repo/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT ../../pom.xml diff --git a/testsrunner/org.eclipse.cdt.testsrunner.feature/feature.xml b/testsrunner/org.eclipse.cdt.testsrunner.feature/feature.xml index 5152c54911c..56c8495e224 100644 --- a/testsrunner/org.eclipse.cdt.testsrunner.feature/feature.xml +++ b/testsrunner/org.eclipse.cdt.testsrunner.feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.testsrunner-parent diff --git a/tools.templates/pom.xml b/tools.templates/pom.xml index eda674f914d..c0ecd5b9c7f 100644 --- a/tools.templates/pom.xml +++ b/tools.templates/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.tools.template-parent diff --git a/unittest/org.eclipse.cdt.unittest.feature/feature.xml b/unittest/org.eclipse.cdt.unittest.feature/feature.xml index b20d00a81bd..ea1e7e903fe 100644 --- a/unittest/org.eclipse.cdt.unittest.feature/feature.xml +++ b/unittest/org.eclipse.cdt.unittest.feature/feature.xml @@ -12,7 +12,7 @@ diff --git a/unittest/pom.xml b/unittest/pom.xml index d6cdb9f2184..3c2cdc617c9 100644 --- a/unittest/pom.xml +++ b/unittest/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.unittest-parent diff --git a/util/pom.xml b/util/pom.xml index 8b5c3d11cec..250600afb74 100644 --- a/util/pom.xml +++ b/util/pom.xml @@ -17,7 +17,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.util-parent diff --git a/visualizer/org.eclipse.cdt.visualizer-feature/feature.xml b/visualizer/org.eclipse.cdt.visualizer-feature/feature.xml index 385e05ac97f..d842a9a7752 100644 --- a/visualizer/org.eclipse.cdt.visualizer-feature/feature.xml +++ b/visualizer/org.eclipse.cdt.visualizer-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.visualizer-parent diff --git a/windows/org.eclipse.cdt.msw-feature/feature.xml b/windows/org.eclipse.cdt.msw-feature/feature.xml index 592bba5c50b..34201814e98 100644 --- a/windows/org.eclipse.cdt.msw-feature/feature.xml +++ b/windows/org.eclipse.cdt.msw-feature/feature.xml @@ -12,7 +12,7 @@ org.eclipse.cdt cdt-parent - 11.6.0-SNAPSHOT + 11.6.1-SNAPSHOT org.eclipse.cdt.windows-parent