From b357e88ca4201f6a912ffcacc63510eee62bb307 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Oct 2025 18:26:56 +0000 Subject: [PATCH 1/3] Initial plan From 0924e21f9978fdad2784bc083c0b38c43e6ed5be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Oct 2025 18:34:11 +0000 Subject: [PATCH 2/3] Change INFO to DEBUG for platform detection logging Co-authored-by: tiagolascasas <25725952+tiagolascasas@users.noreply.github.com> --- .../src/pt/up/fe/specs/clang/SupportedPlatform.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java b/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java index 3ed7f588b..56819dfbd 100644 --- a/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java +++ b/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java @@ -66,7 +66,7 @@ private static SupportedPlatform calculateCurrentPlatform() { var macosVersion = getMacOSVersion(); if (macosVersion != null && macosVersion < SUPPORTED_MAC_VERSION) { - ClavaLog.info("Current MacOS version is " + macosVersion + " but only " + SUPPORTED_MAC_VERSION + ClavaLog.debug("Current MacOS version is " + macosVersion + " but only " + SUPPORTED_MAC_VERSION + " and above are supported, execution might fail"); } @@ -82,7 +82,7 @@ private static SupportedPlatform calculateCurrentPlatform() { var linuxMajorVersion = getLinuxMajorVersion(); if (linuxMajorVersion == null) { - ClavaLog.info("Could not determine Linux version, running at your own risk"); + ClavaLog.debug("Could not determine Linux version, running at your own risk"); return LINUX_5; } @@ -106,7 +106,7 @@ private static Integer getLinuxMajorVersion() { var dotIndex = linuxVersion.indexOf('.'); if (dotIndex == -1) { - ClavaLog.info("Could not extract major version from Linux OS version string, expected at least a . : '" + ClavaLog.debug("Could not extract major version from Linux OS version string, expected at least a . : '" + linuxVersion + "'"); return null; } @@ -116,7 +116,7 @@ private static Integer getLinuxMajorVersion() { var majorVersion = SpecsStrings.parseInteger(majorVersionString); if (majorVersion == null) { - ClavaLog.info("Could not extract major version from Linux OS version string, '" + majorVersionString + ClavaLog.debug("Could not extract major version from Linux OS version string, '" + majorVersionString + "' is not an integer: '" + linuxVersion + "'"); return null; } @@ -134,7 +134,7 @@ private static Double getMacOSVersion() { var versionNumber = SpecsStrings.parseDouble(majorMinor); if (versionNumber == null) { - ClavaLog.info("Could not convert MacOS version to a double: '" + macosVersion + "'"); + ClavaLog.debug("Could not convert MacOS version to a double: '" + macosVersion + "'"); return null; } From cdd57a6cce279e2c73a909861c1d76b95093e6ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 02:47:39 +0000 Subject: [PATCH 3/3] Remove all platform version logging to eliminate stderr output Co-authored-by: tiagolascasas <25725952+tiagolascasas@users.noreply.github.com> --- .../up/fe/specs/clang/SupportedPlatform.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java b/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java index 56819dfbd..e43696fa6 100644 --- a/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java +++ b/ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java @@ -38,7 +38,6 @@ public enum SupportedPlatform implements StringProvider { .newLazyHelperWithValue(SupportedPlatform.class); - private static final double SUPPORTED_MAC_VERSION = 11.5; private static final double SUPPORTED_LINUX_VERSION = 5; public static EnumHelperWithValue getHelper() { @@ -63,13 +62,6 @@ private static SupportedPlatform calculateCurrentPlatform() { // Generic Mac if (SpecsPlatforms.isMac()) { - var macosVersion = getMacOSVersion(); - - if (macosVersion != null && macosVersion < SUPPORTED_MAC_VERSION) { - ClavaLog.debug("Current MacOS version is " + macosVersion + " but only " + SUPPORTED_MAC_VERSION - + " and above are supported, execution might fail"); - } - return MAC_OS; } @@ -82,7 +74,6 @@ private static SupportedPlatform calculateCurrentPlatform() { var linuxMajorVersion = getLinuxMajorVersion(); if (linuxMajorVersion == null) { - ClavaLog.debug("Could not determine Linux version, running at your own risk"); return LINUX_5; } @@ -106,8 +97,6 @@ private static Integer getLinuxMajorVersion() { var dotIndex = linuxVersion.indexOf('.'); if (dotIndex == -1) { - ClavaLog.debug("Could not extract major version from Linux OS version string, expected at least a . : '" - + linuxVersion + "'"); return null; } @@ -116,31 +105,12 @@ private static Integer getLinuxMajorVersion() { var majorVersion = SpecsStrings.parseInteger(majorVersionString); if (majorVersion == null) { - ClavaLog.debug("Could not extract major version from Linux OS version string, '" + majorVersionString - + "' is not an integer: '" + linuxVersion + "'"); return null; } return majorVersion; } - private static Double getMacOSVersion() { - var macosVersion = System.getProperty("os.version"); - - // Extract major.minor (e.g., "14.7" from "14.7.6") - var versionParts = macosVersion.split("\\."); - String majorMinor = versionParts.length >= 2 ? versionParts[0] + "." + versionParts[1] : macosVersion; - - var versionNumber = SpecsStrings.parseDouble(majorMinor); - - if (versionNumber == null) { - ClavaLog.debug("Could not convert MacOS version to a double: '" + macosVersion + "'"); - return null; - } - - return versionNumber; - } - @Override public String getString() { return getName();