Skip to content

Commit 852f552

Browse files
Merge pull request #2316 from clash-lang/fix-multiple-hidden-flags
Disable multiple-hidden on 1.6
2 parents fea872d + 373a853 commit 852f552

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

.ci/build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,16 @@ set -u
2424

2525
# Build with default constraints
2626
cabal v2-build all --write-ghc-environment-files=always
27+
28+
# `CI_COMMIT_TAG` is set when a tag has been created on GitHub. We use this to
29+
# trigger a release pipeline (release to Snap / Hackage).
30+
if [[ ${CI_COMMIT_TAG:-} != "" ]]; then
31+
set +e
32+
! $(cat dist-newstyle/cache/plan.json | python3 -m json.tool | grep multiple-hidden | grep -q true)
33+
if [[ $? != 0 ]]; then
34+
echo "found enable multiple_hidden flag in 'dist-newstyle/cache/plan.json'"
35+
echo "multiple_hidden flag should be disabled on releases!"
36+
exit 1;
37+
fi
38+
set -e
39+
fi

.ci/cabal.project.local

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package *
1010

1111
package clash-prelude
1212
ghc-options: -Werror
13-
flags: +doctests +multiple-hidden
13+
flags: +doctests
1414
tests: True
1515
benchmarks: True
1616

@@ -47,7 +47,7 @@ package clash-lib-hedgehog
4747
package clash-testsuite
4848
ghc-options: -Werror
4949
-- enable cosim
50-
flags: +cosim +multiple-hidden
50+
flags: +cosim
5151

5252
package clash-benchmark
5353
ghc-options: -Werror

.ci/gitlab/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
variables:
66
# Note that we copy+paste the image name into CACHE_FALLBACK_KEY. If we don't,
77
# $GHC_VERSION gets inserted at verbatim, instead of resolving to some ghc version.
8-
CACHE_FALLBACK_KEY: $CI_JOB_NAME-1.6-ghcr.io/clash-lang/clash-ci-$GHC_VERSION:2022-05-10-3-non_protected
8+
CACHE_FALLBACK_KEY: $CI_JOB_NAME-1-6-ghcr.io/clash-lang/clash-ci-$GHC_VERSION:2022-05-10-3-non_protected
99
GIT_SUBMODULE_STRATEGY: recursive
1010
TERM: xterm-color
1111
retry:

clash-prelude/src/Clash/Signal.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,7 @@ andEnable = \en f -> andSpecificEnable en (const f) (Proxy @dom)
13041304
-- See Note [Going from WithSingleDomain to WithSpecificDomain]
13051305
{-# INLINE andEnable #-}
13061306

1307+
#ifdef CLASH_MULTIPLE_HIDDEN
13071308
{- | Merge enable signal with signal of bools by applying the boolean AND
13081309
operation.
13091310
@@ -1320,7 +1321,6 @@ examples for more information.
13201321
13211322
<#hiddenclockandreset Click here to read more about hidden clocks, resets, and enables>
13221323
1323-
#ifdef CLASH_MULTIPLE_HIDDEN
13241324
=== __Example__
13251325
'andSpecificEnable' can only be used when it can find the specified domain
13261326
in /r/:
@@ -1336,8 +1336,8 @@ Type variables work too, if they are in scope. For example:
13361336
reg = 'register' @@dom 5 (reg + 1)
13371337
f en = 'andSpecificEnable' @@dom en reg
13381338
@
1339-
#endif
13401339
-}
1340+
#endif
13411341
andSpecificEnable
13421342
:: forall dom r
13431343
. ( HiddenEnable dom

tests/clash-testsuite.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ flag multiple-hidden
2525
experimental feature, possibly triggering confusing error messages. By
2626
default, it is enabled on development versions of Clash and disabled on
2727
releases.
28-
default: True
28+
default: False
2929
manual: True
3030

3131
common basic-config

0 commit comments

Comments
 (0)