georgefst / evdev

Haskell bindings to libevdev. Read from Linux input devices, and create virtual ones.
https://hackage.haskell.org/package/evdev
13 stars 6 forks source link

Relax dependencies bounds on evdev-streamly to support GHC 9.6 #36

Closed rmgaray closed 2 days ago

rmgaray commented 1 month ago

Hello! I noticed that this project does not compile on GHC versions newer than GHC 9.4 . This is what happens with 9.6.5:

$ cabal build --minimize-conflict-set evdev
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: evdev-streamly-0.0.2.0 (user goal)
[__1] next goal: streamly (dependency of evdev-streamly)
[__1] rejecting: streamly-0.10.1 (conflict: evdev-streamly => streamly^>=0.9)
[__1] skipping: streamly-0.10.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '^>=0.9' from
'evdev-streamly')
[__1] trying: streamly-0.9.0
[__2] next goal: streamly-core (dependency of streamly)
[__2] rejecting: streamly-core-0.2.2 (conflict: streamly =>
streamly-core==0.1.0)
[__2] skipping: streamly-core-0.2.1, streamly-core-0.2.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '==0.1.0' from 'streamly')
[__2] trying: streamly-core-0.1.0
[__3] next goal: base (dependency of evdev-streamly)
[__3] rejecting: base-4.18.2.1/installed-4.18.2.1 (conflict: streamly-core =>
ghc-prim>=0.5.3 && <0.10, base => ghc-prim==0.10.0/installed-0.10.0)
[__3] rejecting: base-4.20.0.1, base-4.20.0.0, base-4.19.1.0, base-4.19.0.0,
base-4.18.2.1, base-4.18.2.0, base-4.18.1.0, base-4.18.0.0, base-4.17.2.1,
base-4.17.2.0, base-4.17.1.0, base-4.17.0.0, base-4.16.4.0, base-4.16.3.0,
base-4.16.2.0, base-4.16.1.0, base-4.16.0.0, base-4.15.1.0, base-4.15.0.0,
base-4.14.3.0, base-4.14.2.0, base-4.14.1.0, base-4.14.0.0, base-4.13.0.0,
base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0, base-4.10.0.0,
base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0, base-4.8.0.0,
base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1, base-4.6.0.0,
base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0, base-4.3.1.0,
base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0, base-4.1.0.0,
base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from non-upgradeable
package requires installed instance)
[__3] fail (backjumping, conflict set: base, evdev-streamly, streamly-core)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, streamly, evdev-streamly,
streamly-core

But simply allowing a newer version of streamly seems to fix the issue:

$ cabal build --allow-newer="evdev-streamly:evdev" evdev
Resolving dependencies...
Build profile: -w ghc-9.6.5 -O1
In order, the following will be built (use -v for more details):
 - evdev-2.3.1.1 (lib) (first run)
Configuring library for evdev-2.3.1.1..
Preprocessing library for evdev-2.3.1.1..
Building library for evdev-2.3.1.1..

In this case, cabal could compile it fine with streamly-0.10.1. Could we bump this dependency to support GHC 9.6? I ran the evdev:test suite without issues and evtest also seems to work after the update.

rmgaray commented 1 month ago

I also tried to compile the project on GHC 9.8, but in that case I found that streamly-fsnotify is incompatible with the version of base in that GHC version, so some changes in the codebase are necessary.

georgefst commented 2 days ago

OK, I've bumped most dependencies and released.

I'll try to release a new version at some point soon which uses new-style Streamly streams and thus removes the deprecation warnings. This will involve an update to the latest version of streamly-fsnotify and since I'll be making breaking changes anyway I may do it alongside #37.

I also tried to compile the project on GHC 9.8, but in that case I found that streamly-fsnotify is incompatible with the version of base in that GHC version, so some changes in the codebase are necessary.

Are you sure? I can't reproduce this part.