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

taffybar-3.3.0 failed to build in Stackage Nightly #542

Open
juhp opened this issue Jan 19, 2022 · 9 comments
Open

taffybar-3.3.0 failed to build in Stackage Nightly #542

juhp opened this issue Jan 19, 2022 · 9 comments
Labels
easy This issue can be resolved easily and might be a good first issue help wanted Help is wanted on this issue important This issue is has high priority

Comments

@juhp
Copy link

juhp commented Jan 19, 2022

Preprocessing library for taffybar-3.3.0..                                                                             [102/165469]
Building library for taffybar-3.3.0..                            
[43 of 65] Compiling System.Taffybar.Context                                                                                       

/var/stackage/work/unpack-dir/unpacked/taffybar-3.3.0-bf5ed92ef440fbb62f36f4edb693c518a5adcb523012ad3967ac654246c9920e/src/System/T
affybar/Context.hs:170:17: error:
    • Couldn't match expected type: (?self::GI.Gdk.Screen) =>                                                                      
                                    GI.Gdk.ScreenMonitorsChangedCallback                                                           
                  with actual type: IO ()                                                                                          
    • In the second argument of ‘flip’, namely                                                                                     
        ‘(runReaderT forceRefreshTaffyWindows context)’                                                                            
      In the second argument of ‘(.)’, namely                                                                                      
        ‘flip                   
           GI.Gdk.afterScreenMonitorsChanged                                                                                       
           (runReaderT forceRefreshTaffyWindows context)’                                                                          
      In the second argument of ‘(>>=)’, namely                                                                                    
        ‘(lift                  
            . flip              
                GI.Gdk.afterScreenMonitorsChanged                                                                                  
                (runReaderT forceRefreshTaffyWindows context))’                                                                    
    |                           
170 |                (runReaderT forceRefreshTaffyWindows context))                                                                
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                  

/var/stackage/work/unpack-dir/unpacked/taffybar-3.3.0-bf5ed92ef440fbb62f36f4edb693c518a5adcb523012ad3967ac654246c9920e/src/System/T
affybar/Context.hs:374:18: error:
    • Couldn't match type: ReaderT Context IO ()                                                                                   
                     with: MonadIO IO => ReaderT Context IO ()                                                                     
      Expected: Listener                                         
        Actual: Event -> ReaderT Context IO ()                                                                                     
    • In the first argument of ‘subscribeToAll’, namely                                                                            
        ‘filteredListener’                                       
      In a stmt of a 'do' block: subscribeToAll filteredListener                                                                   
      In the expression:                                         
        do eventAtoms <- mapM (runX11 . getAtom) eventNames                                                                        
           let filteredListener event@PropertyEvent {ev_atom = atom}                                                               
                 = when (atom `elem` eventAtoms)                                                                                   
                     $ catchAny (listener event) (const $ return ())                                                    [65/165469]
               filteredListener _ = return ()                                                                                      
           subscribeToAll filteredListener                                                                                         
    |                           
374 |   subscribeToAll filteredListener                                                                                            
    |                  ^^^^^^^^^^^^^^^^                                                                                            

/var/stackage/work/unpack-dir/unpacked/taffybar-3.3.0-bf5ed92ef440fbb62f36f4edb693c518a5adcb523012ad3967ac654246c9920e/src/System/T
affybar/Context.hs:378:38: error:
    • Couldn't match type: MonadIO IO => ReaderT Context IO ()                                                                     
                     with: ReaderT Context IO b0                                                                                   
      Expected: (Unique, Listener) -> ReaderT Context IO b0                                                                        
        Actual: (Unique, Listener) -> Taffy IO ()                                                                                  
    • In the first argument of ‘mapM_’, namely ‘applyListener’                                                                     
      In the second argument of ‘(>>=)’, namely ‘mapM_ applyListener’                                                              
      In the expression: asksContextVar listeners >>= mapM_ applyListener                                                          
    |                           
378 |   asksContextVar listeners >>= mapM_ applyListener                                                                           
    |                                      ^^^^^^^^^^^^^                                                                           

This might be due to some recent library version updates perhaps, I dunno.

@juhp
Copy link
Author

juhp commented Jan 19, 2022

BTW JFYI we are hoping to release LTS 19 fairly soon.

juhp added a commit to commercialhaskell/stackage that referenced this issue Jan 19, 2022
@lifer0se
Copy link

lifer0se commented Feb 1, 2022

Same issue using cabal install on Arch Linux. Any way to fix the issue? Does it have to do with outdated sources?

I'll try making a cabal project using the source to see if I can replicate the issue there.

@maralorn
Copy link

This issue is caused by the simplified subsumption change in ghc 9. It is easy to fix by eta expanding the functions which have the type error in one of their arguments.

@iharh
Copy link

iharh commented Apr 30, 2022

Could anyone suggest the latest version of working ghc/stack-lts to be able to build taffybar with?

@Mikutut
Copy link

Mikutut commented Aug 3, 2022

Could anyone suggest the latest version of working ghc/stack-lts to be able to build taffybar with?

@iharh Built successfully using resolver: lts-18.28.

Here's my stack.yaml:

resolver: lts-18.28

packages:
- '.'

extra-deps: 
  - gtk3-0.15.7@sha256:d2c599bbed3b7965956db564c5e2bccf4b42b7123628b663901da7da5c90c421,19495
  - taffybar-3.3.0@sha256:1c8a9b1c098cd85637290289b47f0faf18cb1496723d2d933f167a3cb063a08c,7087
  - gi-harfbuzz-0.0.6
  - gi-pango-1.0.26
  - gi-atk-2.0.24
  - gi-cairo-1.0.26
  - gi-dbusmenu-0.4.10
  - gi-dbusmenugtk3-0.4.11
  - gi-gdk-3.0.25
  - gi-gdkpixbuf-2.0.28
  - gi-gdkx11-3.0.12
  - gi-gio-2.0.29
  - gi-glib-2.0.26
  - gi-gmodule-2.0.2
  - gi-gtk-3.0.38
  - gi-xlib-2.0.11
  - gi-gobject-2.0.27
  - ConfigFile-1.1.4@sha256:4cb481f88bbbbba5a61d2c1aa76fda01ae3d8ba9d11439a6cf56a86bfa791883,2097
  - cairo-0.13.8.2@sha256:ef1709c3c4d2c6d68a9a51d9f220dccc0745f6468d2d0868c15a7ecdf8f325a1,4078
  - gio-0.13.8.2@sha256:95a9cc25976992aea0c4d0482b4f98ef165eca9ec2ccd553e2ce646bb0d8c66d,3136
  - glib-0.13.8.2@sha256:f44b829e741b3c3244d523f60b058701dfc067ff64c2ba61d43be4cccfc2663d,3156
  - gtk-sni-tray-0.1.8.0@sha256:d9bc0aa6f01280ff69fd085704855314634574ea771797876bc1f58cb570eca2,2111
  - gtk2hs-buildtools-0.13.8.3@sha256:207229eee7abff12aba2740b32131522086275e46f2e72a0f5bbc3cb781e9d4d,5304
  - haskell-gi-0.26.0@sha256:0dfd446e39bf22d39cb660a36f0b3da36dc359188d72d30fdddbcd1aa206dfd6,5169
  - haskell-gi-base-0.26.0@sha256:abbe7ed834fc0a05c6757efe844f45d7973a571a413cf44d129f86f5c899379b,2448
  - pango-0.13.8.2@sha256:d4057ebddade4cde3e25d7755b5e030e7a7e56fe7365afd37916a7bba46d3fd9,3917
  - xdg-desktop-entry-0.1.1.1@sha256:6add2e483664bebb4d63217795b2b9e4a897c63354ff96674b3d717836cb46ab,1010
  - gi-cairo-connector-0.1.1@sha256:621d03434a0d6e3d5e68178f5890f2a7142818fcf4c6a5b15079f6b67955407d,1213
  - gi-cairo-render-0.1.1@sha256:6784053790b9e43a1f0102cc3fc605989ec202dbc9b05abb5c98ec1551a73741,3527
  - gi-freetype2-2.0.1@sha256:86c6104db20113532739e268cd74000553fd5b80aaab85b4dbfa3d7b65ef74d2,2739

@colonelpanic8
Copy link
Member

@Mikutut oof thats some awful extra deps. Is all of that really necessary?

@Mikutut
Copy link

Mikutut commented Aug 6, 2022

@Mikutut oof thats some awful extra deps. Is all of that really necessary?

At first I only changed the version of gi-harfbuzz, because of compilation error, but then I had to add all those other extra deps to get taffybar to compile properly (mismatching versions of gi-related libraries)

@felixonmars
Copy link
Contributor

#541 Fixes this issue for me under Arch Linux. A release could probably help here :)

@colonelpanic8
Copy link
Member

@felixonmars ah good to know. We do have a new release now. I might give getting it back in to stackage a shot.

@colonelpanic8 colonelpanic8 added easy This issue can be resolved easily and might be a good first issue important This issue is has high priority help wanted Help is wanted on this issue labels May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy This issue can be resolved easily and might be a good first issue help wanted Help is wanted on this issue important This issue is has high priority
Projects
None yet
Development

No branches or pull requests

7 participants