haskell-hvr / cabal-plan

Library and utility for processing cabal's plan.json file
https://hackage.haskell.org/package/cabal-plan
GNU General Public License v2.0
38 stars 25 forks source link

license-report crashes for array-0.5.3.0 with "user error" #27

Closed hpdeifel closed 5 years ago

hpdeifel commented 5 years ago

cabal-plan crashes in the middle of reporting my transitive dependencies with:

cabal-plan: user error (Unit {uId = UnitId "array-0.5.3.0", uPId = PkgId (PkgName "array") (Ver [0,5,3,0]), uType = UnitTypeBuiltin, uSha256 = Nothing, uComps = fromList [(CompNameLib,CompInfo {ciLibDeps = fromList [UnitId "base-4.12.0.0"], ciExeDeps = fromList [], ciBinFile = Nothing})], uFlags = fromList [], uDistDir = Nothing})

Profiling suggest that the crashing line is https://github.com/haskell-hvr/cabal-plan/blob/cd93de6ab26a15383ea9bea3005cec486be9af95/src-exe/LicenseReport.hs#L132

$ cabal-plan --version
cabal-plan 0.4.0.0
$ cabal --version
cabal-install version 2.4.0.0
compiled using version 2.4.0.1 of the Cabal library
$ cabal new-exec -- ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.2
$ ls -l ~/.cabal/packages/hackage.haskell.org/01-index.tar
.rw-r--r-- 554M --- 16 Nov  8:21 /home/---/.cabal/packages/hackage.haskell.org/01-index.tar
hvr commented 5 years ago

@hpdeifel this should be fixed in the upcoming 0.5.0.0 rls

hpdeifel commented 5 years ago

Beautiful, thanks!