commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.98k stars 842 forks source link

Fix #6581 Add `stack -h` #6582

Closed mpilgrem closed 4 months ago

mpilgrem commented 4 months ago

Please also shortly describe how you tested your change. Bonus points for added tests!

mpilgrem commented 4 months ago

The initial problem with the Windows CI was fixed by clearing the CI cache. Perhaps it was an artefact of:

The problem manifested itself with the release.hs Haskell script and error messages like:

2024-05-17T08:09:27.0883514Z + stack etc/scripts/release.hs check
2024-05-17T08:09:29.6388383Z [1 of 3] Compiling Main             ( C:\Users\runneradmin\AppData\Roaming\stack\setup-exe-src\setup-LRiJ_wrZ.hs, C:\Users\runneradmin\AppData\Roaming\stack\setup-exe-src\setup-LRiJ_wrZ.o )
2024-05-17T08:09:29.7575963Z [2 of 3] Compiling StackSetupShim   ( C:\Users\runneradmin\AppData\Roaming\stack\setup-exe-src\setup-shim-LRiJ_wrZ.hs, C:\Users\runneradmin\AppData\Roaming\stack\setup-exe-src\setup-shim-LRiJ_wrZ.o )
2024-05-17T08:09:29.8654177Z [3 of 3] Linking C:\Users\runneradmin\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\tmp-Cabal-simple_LRiJ_wrZ_3.10.3.0_ghc-9.6.5.exe
2024-05-17T08:09:31.7265579Z 
2024-05-17T08:09:31.7266415Z Error: [S-7282]
2024-05-17T08:09:31.7267021Z        Stack failed to execute the build plan.
2024-05-17T08:09:31.7267879Z        
2024-05-17T08:09:31.7268560Z        While executing the build plan, Stack encountered the following errors:
2024-05-17T08:09:31.7269425Z        
2024-05-17T08:09:31.7269917Z        Received ExitFailure 1 when running
2024-05-17T08:09:31.7272672Z        Raw command: "C:\\Users\\runneradmin\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-9.6.5\\bin\\ghc-pkg-9.6.5.exe" --user --no-user-package-db --package-db "C:\\Users\\runneradmin\\AppData\\Roaming\\stack\\snapshots\\7e598327\\pkgdb" describe --simple-output js-flot --expand-pkgroot
2024-05-17T08:09:31.7275132Z        
2024-05-17T08:09:31.7276156Z        
2024-05-17T08:09:31.7276606Z        Received ExitFailure 1 when running
2024-05-17T08:09:31.7278435Z        Raw command: "C:\\Users\\runneradmin\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-9.6.5\\bin\\ghc-pkg-9.6.5.exe" --user --no-user-package-db --package-db "C:\\Users\\runneradmin\\AppData\\Roaming\\stack\\snapshots\\7e598327\\pkgdb" describe --simple-output js-dgtable --expand-pkgroot
2024-05-17T08:09:31.7279956Z        
2024-05-17T08:09:31.7280209Z        
2024-05-17T08:09:31.7280478Z        Received ExitFailure 1 when running
2024-05-17T08:09:31.7282151Z        Raw command: "C:\\Users\\runneradmin\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-9.6.5\\bin\\ghc-pkg-9.6.5.exe" --user --no-user-package-db --package-db "C:\\Users\\runneradmin\\AppData\\Roaming\\stack\\snapshots\\7e598327\\pkgdb" describe --simple-output heaps --expand-pkgroot
2024-05-17T08:09:31.7283995Z        
2024-05-17T08:09:31.7284368Z        
2024-05-17T08:09:31.7284807Z        Received ExitFailure 1 when running
2024-05-17T08:09:31.7288944Z        Raw command: "C:\\Users\\runneradmin\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-9.6.5\\bin\\ghc-pkg-9.6.5.exe" --user --no-user-package-db --package-db "C:\\Users\\runneradmin\\AppData\\Roaming\\stack\\snapshots\\7e598327\\pkgdb" describe --simple-output clock --expand-pkgroot

where stack\snapshots\7e598327 was the snapshot database being created by the compilation of the script and the failure was packages such as js-dgtable were missing from the database.