yesod-auth fails to build with crypton-1.1 and ram

Open Beginner friendly
#1,925 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
haskell

Research direction

Start with Yesod/Auth/Util/PasswordStore.hs at the reported lines 139 and 148, then reproduce the yesod-auth build with crypton-1.1 and ram. Check the failing SHA256 conversions and verify that yesod-auth builds successfully without the reported ByteArrayAccess errors.

Written by the indexing model from the issue text.

Description

       Preprocessing library for yesod-auth-1.6.12.1...                                                                                                                                         
       Building library for yesod-auth-1.6.12.1...                                                                                                                                              
       [ 1 of 11] Compiling Yesod.Auth.Message                                                                                                                                                  
       [ 2 of 11] Compiling Yesod.Auth.Routes                                                                                                                                                   
       [ 3 of 11] Compiling Yesod.Auth                                                                                                                                                          
       [ 4 of 11] Compiling Yesod.Auth.OpenId                                                                                                                                                   
       [ 5 of 11] Compiling Yesod.Auth.Hardcoded                                                                                                                                                
       [ 6 of 11] Compiling Yesod.Auth.GoogleEmail2                                                                                                                                             
       [ 7 of 11] Compiling Yesod.Auth.Dummy                                                                                                                                                    
       [ 8 of 11] Compiling Yesod.Auth.BrowserId                                                                                                                                                
       [ 9 of 11] Compiling Yesod.Auth.Rpxnow                                                                                                                                                   
       [10 of 11] Compiling Yesod.Auth.Util.PasswordStore                                                                                                                                       
       /home/curators/work/unpack-dir/unpacked/yesod-auth-1.6.12.1-8b4416cd8eb15c77a7007ed74387926417b15179a11f71b6ee03059025cea873/Yesod/Auth/Util/PasswordStore.hs:139:7: error: [GHC-39999]  
           • No instance for ‘memory-0.18.0:Data.ByteArray.Types.ByteArrayAccess                                                                        
                                (CH.Digest CH.SHA256)’                                                                                                  
               arising from a use of ‘convert’                                                                                                          
           • In the first argument of ‘($)’, namely ‘convert’                                                                                           
             In the expression:                                                                                                                         
               convert                                                                                                                                  
                 $ ((CH.hashFinalize                                                                                                                    
                       $ CH.hashInit `CH.hashUpdate` password `CH.hashUpdate` salt) ::                                                                  
                      CH.Digest CH.SHA256)                                                                                                              
             In an equation for ‘first_hash’:                                                                                                           
                 first_hash                                                                                                                             
                   = convert                                                                                                                            
                       $ ((CH.hashFinalize                                                                                                              
                             $ CH.hashInit `CH.hashUpdate` password `CH.hashUpdate` salt) ::                                                            
                            CH.Digest CH.SHA256)                                                                                                        
           |                                                                                                                                            
       139 |       convert $                                                                                                                            
           |       ^^^^^^^                                                                                                                                                                      
                                                                                                                                                        
       /home/curators/work/unpack-dir/unpacked/yesod-auth-1.6.12.1-8b4416cd8eb15c77a7007ed74387926417b15179a11f71b6ee03059025cea873/Yesod/Auth/Util/PasswordStore.hs:148:36: error: [GHC-39999] 
           • No instance for ‘memory-0.18.0:Data.ByteArray.Types.ByteArrayAccess                                                                        
                                (CH.Digest CH.SHA256)’                                                                                                  
               arising from a use of ‘convert’                                                                                                          
           • In the first argument of ‘hashRounds’, namely                                                                                              
               ‘(convert (CH.hash bs :: CH.Digest CH.SHA256))’                                                                                          
             In the expression:                                                                                                                         
               hashRounds                                                                                                                               
                 (convert (CH.hash bs :: CH.Digest CH.SHA256)) (rounds - 1)                                                                             
             In an equation for ‘hashRounds’:                                                                                                           
                 hashRounds bs rounds                                                                                                                   
                   = hashRounds                                                                                                                         
                       (convert (CH.hash bs :: CH.Digest CH.SHA256)) (rounds - 1)                                                                                                               
           |                                                                                                                                            
       148 | hashRounds bs rounds = hashRounds (convert (CH.hash bs :: CH.Digest CH.SHA256)) (rounds - 1)                                                            
           |                                    ^^^^^^^ 
Dominant language
Haskell
Stars
2.7k
Forks
386
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yesodweb/yesod

All issues in yesodweb/yesod

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.