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

Builderror with gdkpixbuf 2.0.26 #24

Closed
maralorn opened this issue May 7, 2021 · 3 comments · Fixed by #25
Closed

Builderror with gdkpixbuf 2.0.26 #24

maralorn opened this issue May 7, 2021 · 3 comments · Fixed by #25

Comments

@maralorn
Copy link

maralorn commented May 7, 2021

Hey there. While packaging for nixpkgs I encountered this build error, which I assume is related to our gdkpixbuf bump.

Building library for gtk-sni-tray-0.1.6.0..
[1 of 3] Compiling Paths_gtk_sni_tray ( dist/build/autogen/Paths_gtk_sni_tray.hs, dist/build/Paths_gtk_sni_tray.o, dist/build/Paths_gtk_sni_tray.dyn_o )
[2 of 3] Compiling StatusNotifier.TransparentWindow ( src/StatusNotifier/TransparentWindow.hs, dist/build/StatusNotifier/TransparentWindow.o, dist/build/StatusNotifier/TransparentWindow.dyn_o )
[3 of 3] Compiling StatusNotifier.Tray ( src/StatusNotifier/Tray.hs, dist/build/StatusNotifier/Tray.o, dist/build/StatusNotifier/Tray.dyn_o )

src/StatusNotifier/Tray.hs:125:5: error:
    • Couldn't match type ‘Maybe Pixbuf’ with ‘Pixbuf’
      Expected type: IO (Maybe Pixbuf)
        Actual type: IO (Maybe (Maybe Pixbuf))
    • In a stmt of a 'do' block:
        sequenceA $ pixbufNewFromFile <$> maybeFile
      In the expression:
        do trayLogger DEBUG
             $ printf "Trying to load icon %s as filepath" name
           let nameString = T.unpack name
           fileExists <- doesFileExist nameString
           maybeFile <- if fileExists then
                            return $ Just nameString
                        else
                            fmap join
                              $ sequenceA $ getIconPathFromThemePath nameString <$> themePath
           ....
      In a stmt of a 'do' block:
        if hasIcon || hasPanelIcon then
            do let targetName = ...
               trayLogger DEBUG $ printf "Found icon %s in theme" name
               iconThemeLoadIcon themeForIcon targetName size themeLoadFlags
        else
            do trayLogger DEBUG
                 $ printf "Trying to load icon %s as filepath" name
               let nameString = ...
               fileExists <- doesFileExist nameString
               ....
    |
125 |     sequenceA $ pixbufNewFromFile <$> maybeFile
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@colonelpanic8
Copy link
Member

Thanks for the heads up. I'll try to make a fix soon.

@colonelpanic8
Copy link
Member

@maralorn Is there some way I can reproduce the exact environment of the upgrade. Which version of gdkpixbuf is causing the issue?

@maralorn
Copy link
Author

maralorn commented May 8, 2021

Oh, I am sorry. This happened with version 2.0.26.

You can see the build log here. https://hydra.nixos.org/build/142721509/nixlog/1

If you use nix, you can reproduce this by building nix-build -A haskellPackages.gtk-sni-tray in the root of nixpkgs.

But I guess this will also happen with cabal.

Note: That there is no stackage release with haskell-gi 0.25 yet, so if you use that you might just wanna wait.

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 a pull request may close this issue.

2 participants