From 83ee402a068ed284a7be9ef6c4e2942a0ca6f696 Mon Sep 17 00:00:00 2001 From: Simon Hofmann Date: Mon, 7 Sep 2026 17:30:39 +0200 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20Adopt=20recoverable=20jeff?= =?UTF-8?q?=20deserialization=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update jeff-mlir to the merged upstream import-error fix and cover the former missing-functions abort through Core’s byte-import API. Assisted-by: GPT-6 via Codex --- cmake/ExternalDependencies.cmake | 2 +- .../Compiler/test_compiler_pipeline.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/cmake/ExternalDependencies.cmake b/cmake/ExternalDependencies.cmake index 272d224822..d771e11a23 100644 --- a/cmake/ExternalDependencies.cmake +++ b/cmake/ExternalDependencies.cmake @@ -26,7 +26,7 @@ if(BUILD_MQT_CORE_MLIR) FetchContent_Declare( jeff-mlir GIT_REPOSITORY https://github.com/unitaryfoundation/jeff-mlir.git - GIT_TAG 4732c4f12047e8cbf1890c79e90e30110e6588e2 + GIT_TAG ea09a8b46ec77ff4be8fd54ea72d781a644106c6 EXCLUDE_FROM_ALL) block() # Cap'n Proto, which is fetched transitively by jeff-mlir, uses the generic BUILD_TESTING option diff --git a/mlir/unittests/Compiler/test_compiler_pipeline.cpp b/mlir/unittests/Compiler/test_compiler_pipeline.cpp index 25c2a3454a..138fc08932 100644 --- a/mlir/unittests/Compiler/test_compiler_pipeline.cpp +++ b/mlir/unittests/Compiler/test_compiler_pipeline.cpp @@ -31,7 +31,10 @@ #include "qco_programs.h" #include "qir_programs.h" +#include +#include #include +#include #include #include #include @@ -75,6 +78,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +91,8 @@ using namespace mlir::qc; using namespace mlir::qco; using namespace mlir::qir; +namespace jeff = mlir::jeff; + using QCProgramBuilderFn = NamedMLIRBuilder; using QIRProgramBuilderFn = NamedMLIRBuilder; @@ -124,6 +130,8 @@ class CompilerPipelineTest protected: std::unique_ptr context; + // GoogleTest requires this override name. + // NOLINTNEXTLINE(readability-identifier-naming) void SetUp() override { DialectRegistry registry; registry.insert().setVersionMinor(3); + auto words = capnp::messageToFlatArray(message); + EXPECT_FALSE(JeffProgram::fromBytes( + std::as_bytes(std::span(words.begin(), words.size())))); +} + // Test: jeff programs round-trip through their binary APIs. TEST_F(CompilerPipelineTest, JeffProgramsRoundTripThroughBytesAndFiles) { const std::string qasm = R"(OPENQASM 3.0; From eb654ca23f8c0b5823c22c78c7d74738c1fe0456 Mon Sep 17 00:00:00 2001 From: Simon Hofmann Date: Mon, 7 Sep 2026 18:32:52 +0200 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20Adopt=20the=20jeff=20Windows?= =?UTF-8?q?=20exception=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the upstream follow-up that enables exceptions for the fetched Cap'n Proto dependency without changing Core's exception policy. Remove the unnecessary SetUp naming suppression. Assisted-by: GPT-6 via Codex --- cmake/ExternalDependencies.cmake | 6 +++--- mlir/unittests/Compiler/test_compiler_pipeline.cpp | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake/ExternalDependencies.cmake b/cmake/ExternalDependencies.cmake index d771e11a23..dc5c6b187a 100644 --- a/cmake/ExternalDependencies.cmake +++ b/cmake/ExternalDependencies.cmake @@ -22,11 +22,11 @@ if(BUILD_MQT_CORE_BINDINGS) endif() if(BUILD_MQT_CORE_MLIR) - # Fetch jeff-mlir + # Restore the upstream URL after unitaryfoundation/jeff-mlir#56 is merged. FetchContent_Declare( jeff-mlir - GIT_REPOSITORY https://github.com/unitaryfoundation/jeff-mlir.git - GIT_TAG ea09a8b46ec77ff4be8fd54ea72d781a644106c6 + GIT_REPOSITORY https://github.com/simon1hofmann/jeff-mlir.git + GIT_TAG 650973fa9fafe246918a89506b94fef1424e4ce9 EXCLUDE_FROM_ALL) block() # Cap'n Proto, which is fetched transitively by jeff-mlir, uses the generic BUILD_TESTING option diff --git a/mlir/unittests/Compiler/test_compiler_pipeline.cpp b/mlir/unittests/Compiler/test_compiler_pipeline.cpp index 138fc08932..24673a0ae6 100644 --- a/mlir/unittests/Compiler/test_compiler_pipeline.cpp +++ b/mlir/unittests/Compiler/test_compiler_pipeline.cpp @@ -130,8 +130,6 @@ class CompilerPipelineTest protected: std::unique_ptr context; - // GoogleTest requires this override name. - // NOLINTNEXTLINE(readability-identifier-naming) void SetUp() override { DialectRegistry registry; registry.insert Date: Mon, 7 Sep 2026 20:11:49 +0200 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=8C=20Pin=20merged=20upstream=20je?= =?UTF-8?q?ff-mlir=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restore the official repository now that jeff-mlir #56 has merged. Assisted-by: GPT-6 via Codex --- cmake/ExternalDependencies.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/ExternalDependencies.cmake b/cmake/ExternalDependencies.cmake index dc5c6b187a..dc7c8322f9 100644 --- a/cmake/ExternalDependencies.cmake +++ b/cmake/ExternalDependencies.cmake @@ -22,11 +22,10 @@ if(BUILD_MQT_CORE_BINDINGS) endif() if(BUILD_MQT_CORE_MLIR) - # Restore the upstream URL after unitaryfoundation/jeff-mlir#56 is merged. FetchContent_Declare( jeff-mlir - GIT_REPOSITORY https://github.com/simon1hofmann/jeff-mlir.git - GIT_TAG 650973fa9fafe246918a89506b94fef1424e4ce9 + GIT_REPOSITORY https://github.com/unitaryfoundation/jeff-mlir.git + GIT_TAG 316eab7fab26d80a38278c8bf2ac2d249bda81a1 EXCLUDE_FROM_ALL) block() # Cap'n Proto, which is fetched transitively by jeff-mlir, uses the generic BUILD_TESTING option From 34277fdf98c0cec4a73e440bea5d0a994d27a39f Mon Sep 17 00:00:00 2001 From: Simon Hofmann Date: Mon, 7 Sep 2026 20:31:35 +0200 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=92=AC=20Restore=20jeff-mlir=20fetch?= =?UTF-8?q?=20comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assisted-by: GPT-6 via Codex --- cmake/ExternalDependencies.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/ExternalDependencies.cmake b/cmake/ExternalDependencies.cmake index dc7c8322f9..8294ed8bbe 100644 --- a/cmake/ExternalDependencies.cmake +++ b/cmake/ExternalDependencies.cmake @@ -22,6 +22,7 @@ if(BUILD_MQT_CORE_BINDINGS) endif() if(BUILD_MQT_CORE_MLIR) + # Fetch jeff-mlir FetchContent_Declare( jeff-mlir GIT_REPOSITORY https://github.com/unitaryfoundation/jeff-mlir.git