From 5a019818c153b86b20a9c090be18e7e3eacb89ca Mon Sep 17 00:00:00 2001 From: Jawaharlal Rajan S Date: Thu, 5 Mar 2026 18:54:07 +0530 Subject: [PATCH 1/4] Add support for s390x (IBM Z) architecture --- Rubjerg.Graphviz/GraphvizCommand.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rubjerg.Graphviz/GraphvizCommand.cs b/Rubjerg.Graphviz/GraphvizCommand.cs index 6b0b292..643bcb5 100644 --- a/Rubjerg.Graphviz/GraphvizCommand.cs +++ b/Rubjerg.Graphviz/GraphvizCommand.cs @@ -27,6 +27,7 @@ internal static string Rid Architecture.Arm64 => "arm64", Architecture.X86 => "x86", Architecture.Arm => "arm", + Architecture.S390x => "s390x", _ => "unknown" }; @@ -130,3 +131,4 @@ public static (byte[] stdout, string stderr) Exec(Graph input, string format = " } } + From e814ec861ec7beb3834a5f89740fdc4b2c5d20bb Mon Sep 17 00:00:00 2001 From: Jawaharlal Rajan S Date: Thu, 5 Mar 2026 19:08:10 +0530 Subject: [PATCH 2/4] Add s390x support if NET6_0_OR_GREATER Added support for s390x architecture in Rid property. --- Rubjerg.Graphviz/GraphvizCommand.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Rubjerg.Graphviz/GraphvizCommand.cs b/Rubjerg.Graphviz/GraphvizCommand.cs index 643bcb5..041eaaa 100644 --- a/Rubjerg.Graphviz/GraphvizCommand.cs +++ b/Rubjerg.Graphviz/GraphvizCommand.cs @@ -27,7 +27,9 @@ internal static string Rid Architecture.Arm64 => "arm64", Architecture.X86 => "x86", Architecture.Arm => "arm", - Architecture.S390x => "s390x", +#if NET6_0_OR_GREATER + Architecture.S390x => "s390x", // s390x support added in .NET 6 +endif _ => "unknown" }; @@ -132,3 +134,4 @@ public static (byte[] stdout, string stderr) Exec(Graph input, string format = " } + From ec5bffabc13165af31c30653a4a17f4cc9e9d56c Mon Sep 17 00:00:00 2001 From: Jawahars Date: Thu, 5 Mar 2026 19:27:42 +0530 Subject: [PATCH 3/4] fix typo, formatting - s390x support --- Rubjerg.Graphviz/GraphvizCommand.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Rubjerg.Graphviz/GraphvizCommand.cs b/Rubjerg.Graphviz/GraphvizCommand.cs index 041eaaa..6f79eb7 100644 --- a/Rubjerg.Graphviz/GraphvizCommand.cs +++ b/Rubjerg.Graphviz/GraphvizCommand.cs @@ -29,7 +29,7 @@ internal static string Rid Architecture.Arm => "arm", #if NET6_0_OR_GREATER Architecture.S390x => "s390x", // s390x support added in .NET 6 -endif +#endif _ => "unknown" }; @@ -133,5 +133,3 @@ public static (byte[] stdout, string stderr) Exec(Graph input, string format = " } } - - From f738a41f14851f0b73efd68ae46afa22e8b6f558 Mon Sep 17 00:00:00 2001 From: Jawahars Date: Mon, 9 Mar 2026 19:47:38 +0530 Subject: [PATCH 4/4] Replace S390x conditional compilation with runtime value Uses a numeric cast for the S390x enum value to maintain compatibility with .NET Standard 2.0 while supporting newer .NET 6+ environments. --- Rubjerg.Graphviz/GraphvizCommand.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Rubjerg.Graphviz/GraphvizCommand.cs b/Rubjerg.Graphviz/GraphvizCommand.cs index 6f79eb7..417a49c 100644 --- a/Rubjerg.Graphviz/GraphvizCommand.cs +++ b/Rubjerg.Graphviz/GraphvizCommand.cs @@ -27,9 +27,9 @@ internal static string Rid Architecture.Arm64 => "arm64", Architecture.X86 => "x86", Architecture.Arm => "arm", -#if NET6_0_OR_GREATER - Architecture.S390x => "s390x", // s390x support added in .NET 6 -#endif + // Cast allows compilation in .NET Standard 2.0/2.1. + // (Architecture)5 is S390x, added in .NET 6. + (Architecture)5 => "s390x", _ => "unknown" };