From cfd735787c100742e913cde84430234bfe71f119 Mon Sep 17 00:00:00 2001 From: Leon Schoorl Date: Fri, 25 Aug 2023 17:14:14 +0200 Subject: [PATCH 1/2] Move "Work-around for GHC 9.4 bug in ExpWithClashCF" Moves the workaround added in c1ef28f36fbfed5b23de04aa43cf585a8bb83377 from Exp.hs to ExpWithGhcCF.hs When I updated the CI image from 9.4.3 to 9.4.6 the ExpWithGhcCF test started to fail on the 9.4.6 nightly test with Other error: panic! (the 'impossible' happened) GHC version 9.4.6: refineFromInScope I've done some testing and I've found: Using ghc <= 9.4.4: The -fno-specialise workaround isn't need at all Using ghc 9.4.5 and 9.4.6: It needs the -fno-specialise workaround in ExpWithGhcCF, not in Exp. Otherwise the ExpWithGhcCF test fails, not the ExpWithClashCF like mentioned in the original commit msg. --- tests/shouldwork/Numbers/Exp.hs | 1 - tests/shouldwork/Numbers/ExpWithGhcCF.hs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/shouldwork/Numbers/Exp.hs b/tests/shouldwork/Numbers/Exp.hs index 022069f270..4c4bdbd0f0 100644 --- a/tests/shouldwork/Numbers/Exp.hs +++ b/tests/shouldwork/Numbers/Exp.hs @@ -4,7 +4,6 @@ {-# LANGUAGE PartialTypeSignatures #-} {-# OPTIONS_GHC -Wno-partial-type-signatures #-} -{-# OPTIONS_GHC -fno-specialise #-} -- TODO: remove when https://gitlab.haskell.org/ghc/ghc/-/issues/23109#note_499130 is fixed {-# OPTIONS_GHC -fplugin=GHC.TypeLits.Extra.Solver #-} {-# OPTIONS_GHC -fplugin=GHC.TypeLits.Normalise #-} diff --git a/tests/shouldwork/Numbers/ExpWithGhcCF.hs b/tests/shouldwork/Numbers/ExpWithGhcCF.hs index f903dd940d..6dcc1083cc 100644 --- a/tests/shouldwork/Numbers/ExpWithGhcCF.hs +++ b/tests/shouldwork/Numbers/ExpWithGhcCF.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-specialise #-} -- TODO: remove when https://gitlab.haskell.org/ghc/ghc/-/issues/23109#note_499130 is fixed module ExpWithGhcCF where import Clash.Prelude From 12855bfe21cc596da5331d76540ffbe0719ae504 Mon Sep 17 00:00:00 2001 From: Leon Schoorl Date: Mon, 28 Aug 2023 15:32:01 +0200 Subject: [PATCH 2/2] Make sure to apply the mmap workaround on ffi:example too --- .ci/gitlab/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci/gitlab/test.yml b/.ci/gitlab/test.yml index 69b983294b..8d733746a7 100644 --- a/.ci/gitlab/test.yml +++ b/.ci/gitlab/test.yml @@ -174,6 +174,8 @@ ffi:example: - ln -s /bin/true "$MASKBINS/vvp" - ls -al "$MASKBINS" - .ci/setup.sh + # Make sure we get custom cabals setting in the clash-example project too + - cp cabal.project.local clash-ffi/example script: - cd clash-ffi/example && ./run-iverilog.sh after_script: