Skip to content

Commit

Permalink
Merge pull request #2316 from clash-lang/fix-multiple-hidden-flags
Browse files Browse the repository at this point in the history
Disable multiple-hidden on 1.6
  • Loading branch information
martijnbastiaan authored Aug 30, 2022
2 parents fea872d + 373a853 commit 852f552
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
13 changes: 13 additions & 0 deletions .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,16 @@ set -u

# Build with default constraints
cabal v2-build all --write-ghc-environment-files=always

# `CI_COMMIT_TAG` is set when a tag has been created on GitHub. We use this to
# trigger a release pipeline (release to Snap / Hackage).
if [[ ${CI_COMMIT_TAG:-} != "" ]]; then
set +e
! $(cat dist-newstyle/cache/plan.json | python3 -m json.tool | grep multiple-hidden | grep -q true)
if [[ $? != 0 ]]; then
echo "found enable multiple_hidden flag in 'dist-newstyle/cache/plan.json'"
echo "multiple_hidden flag should be disabled on releases!"
exit 1;
fi
set -e
fi
4 changes: 2 additions & 2 deletions .ci/cabal.project.local
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package *

package clash-prelude
ghc-options: -Werror
flags: +doctests +multiple-hidden
flags: +doctests
tests: True
benchmarks: True

Expand Down Expand Up @@ -47,7 +47,7 @@ package clash-lib-hedgehog
package clash-testsuite
ghc-options: -Werror
-- enable cosim
flags: +cosim +multiple-hidden
flags: +cosim

package clash-benchmark
ghc-options: -Werror
Expand Down
2 changes: 1 addition & 1 deletion .ci/gitlab/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
variables:
# Note that we copy+paste the image name into CACHE_FALLBACK_KEY. If we don't,
# $GHC_VERSION gets inserted at verbatim, instead of resolving to some ghc version.
CACHE_FALLBACK_KEY: $CI_JOB_NAME-1.6-ghcr.io/clash-lang/clash-ci-$GHC_VERSION:2022-05-10-3-non_protected
CACHE_FALLBACK_KEY: $CI_JOB_NAME-1-6-ghcr.io/clash-lang/clash-ci-$GHC_VERSION:2022-05-10-3-non_protected
GIT_SUBMODULE_STRATEGY: recursive
TERM: xterm-color
retry:
Expand Down
4 changes: 2 additions & 2 deletions clash-prelude/src/Clash/Signal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ andEnable = \en f -> andSpecificEnable en (const f) (Proxy @dom)
-- See Note [Going from WithSingleDomain to WithSpecificDomain]
{-# INLINE andEnable #-}

#ifdef CLASH_MULTIPLE_HIDDEN
{- | Merge enable signal with signal of bools by applying the boolean AND
operation.
Expand All @@ -1320,7 +1321,6 @@ examples for more information.
<#hiddenclockandreset Click here to read more about hidden clocks, resets, and enables>
#ifdef CLASH_MULTIPLE_HIDDEN
=== __Example__
'andSpecificEnable' can only be used when it can find the specified domain
in /r/:
Expand All @@ -1336,8 +1336,8 @@ Type variables work too, if they are in scope. For example:
reg = 'register' @@dom 5 (reg + 1)
f en = 'andSpecificEnable' @@dom en reg
@
#endif
-}
#endif
andSpecificEnable
:: forall dom r
. ( HiddenEnable dom
Expand Down
2 changes: 1 addition & 1 deletion tests/clash-testsuite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ flag multiple-hidden
experimental feature, possibly triggering confusing error messages. By
default, it is enabled on development versions of Clash and disabled on
releases.
default: True
default: False
manual: True

common basic-config
Expand Down

0 comments on commit 852f552

Please sign in to comment.