Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set version bounds for data-default #123

Merged
merged 2 commits into from
Nov 14, 2024
Merged

Conversation

t-wallet
Copy link
Collaborator

@t-wallet t-wallet commented Nov 8, 2024

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.

Clash prelude uses and re-exports data-default-class, so we should use it as well. Fixes CI failures saying that an instance Default for SimulationConfig could not be deduced.
@DigitalBrains1
Copy link
Member

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.

@t-wallet t-wallet changed the title Switch from data-default to data-default-class Set version bounds for data-default Nov 14, 2024
@t-wallet t-wallet force-pushed the switch-to-data-default-class branch from d8fdeea to f071cf5 Compare November 14, 2024 10:34
…ult from data-default-class anymore. As clash-prelude uses data-default-class, this leads to two incompatible versions of the Default class. We constrain data-default for now and later decide what all our packages should do.
@t-wallet t-wallet force-pushed the switch-to-data-default-class branch from f071cf5 to c081579 Compare November 14, 2024 11:01
Copy link
Member

@DigitalBrains1 DigitalBrains1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you squash commit with this commit msg:

Set version bounds for `data-default` (#123)

data-default 0.8 introduced a breaking change: it doesn't export Default
from data-default-class anymore. As clash-prelude uses
data-default-class, this leads to two incompatible versions of the
Default class. We constrain data-default for now and later decide what
all our packages should do.

@t-wallet t-wallet merged commit e7326a4 into main Nov 14, 2024
8 checks passed
@t-wallet t-wallet deleted the switch-to-data-default-class branch November 14, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants