Open bgamari opened 6 months ago
I have minimized the issue quite significantly. The data constructor in question here appears to be Clash.Signal.Internal.(:-)
, which appears to be mentioned a few places in the "bad" case yet not at all in the "good". Given that :-
isn't synthesizable, is it expected that it appear in programs compiled by Clash?
It appears that bundle
in the example is being worker-wrapper'd. Perhaps this is the reason?
I can confirm that -fno-worker-worker
avoids the issue. I have also seen that clash-cores
disables worker-wrapper. Is this recommended practice? If so, it should probably be documented a bit more prominently.
We do it for the starter project as well, though going by the comment for different reasons: https://github.com/clash-lang/stack-templates/blob/572614b9c34dd4b17f7eb209931e873f220b3a7f/projects/simple/%7B%7Bname%7D%7D.cabal#L56-L59
Also, when we compile from source we emit a warning when W/W is enabled globally: https://github.com/clash-lang/clash-compiler/commit/957a302c9aa3afce17c623e7daa79dfd14dc10fb
With
clash-ghc-1.8.0
and GHC 9.2.8, a simple entity using myaxi-register
package builds fine when built in conjunction withaxi-register
in a single compilation:However, if we use
Cabal
to buildaxi-register
and then compile the same testcase using the unfoldings contained in the interface files we have the following error:This is very reminiscent of https://github.com/clash-lang/clash-compiler/issues/2628
Reproducing