logo
首页技术栈工具库讨论
packunused

packunused

This simple CLI tool allows to find out which of the packages listed as build-depends in a Cabal package description file are redundant. packunused works by taking advantage of GHC's -ddump-minimal-imports feature which creates .import files for each compiled module containing a minimal set of explicit import declarations. These .import files together with Cabal's generated package configuration meta-data is analyzed by packunused to detect potentially redundant package dependencies. In order to use packunused you have to configure the package as usual. See the example session below: The -O0 --disable-library-profiling options are just to speed up compilation. In some cases you might want to pass additional options to the configure step, such as --enable-benchmark or --enable-tests. When run, packunused prints a report to standard output listing its findings for each component built. The following is an example for the packunused package itself, with a redundant dependency added for demonstration on purpose:
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
HACKAGE
carbal install packunused
查看
标签
根据用户添加的标签生成
暂无标签