clash-lang / clash-protocols

a battery-included library for dataflow protocols
Other
19 stars 7 forks source link

Set version bounds for `data-default` #123

Closed t-wallet closed 4 days ago

t-wallet commented 1 week ago

Fixes CI failures complaining about an instance Default for SimulationConfig that could not be deduced. data-default version 0.8 introduced a breaking change because it does not export Default from data-default-class anymore, which is necessary for compatibility with clash-prelude for the moment.

DigitalBrains1 commented 6 days ago

For now, I'd just constrain the dependency:

--- a/clash-protocols/clash-protocols.cabal
+++ b/clash-protocols/clash-protocols.cabal
@@ -116,7 +116,7 @@ library
     , clash-protocols-base
     , circuit-notation
     , clash-prelude-hedgehog
-    , data-default
+    , data-default ^>= 0.7.1.1
     , deepseq
     , extra
     , ghc >= 8.7 && < 9.7

and be done with it here. And then we need to decide in clash-compiler how to deal with the changed relationship between data-default and data-default-class. If we want things like clash-protocols and clash-cores to potentially be compatible with both Clash 1.8 and Clash 1.10, we'll need to think about how that should work. Or if we just want compatibility with Clash 1.10, we can switch everything to data-default >= 0.8.

Why 0.7.1.1? Well, that's what is in several "repositories" like NixOS and the Stack used in CI, and it's also what was the current version when clash-protocols was created.