我现在正在学习带有堆栈的 hakyll 静态站点生成器。
当我stack build
在我的 Hakyll 站点的目录中执行要重新构建时site.hs
,堆栈也每次都重新构建和复制/注册依赖项,如下所示:
$ stack --version
Version 1.6.5, Git revision 24ab0d6ff07f28276e082c3ce74dfdeb1a2ca9e9 (5514 commits) x86_64 hpack-0.20.0
$ grep -Ev '^[[:space:]]*#' stack.yaml | uniq
resolver: lts-11.4
packages:
- .
$ stack build
haddock-library-1.4.5: configure
haddock-library-1.4.5: build
haddock-library-1.4.5: copy/register
pandoc-2.1.2: configure
pandoc-2.1.2: build
pandoc-2.1.2: copy/register
pandoc-citeproc-0.14.3: configure
pandoc-citeproc-0.14.3: build
pandoc-citeproc-0.14.3: copy/register
hakyll-4.12.1.0: configure
hakyll-4.12.1.0: build
hakyll-4.12.1.0: copy/register
... and site.hs.compilation ...
这对我来说很奇怪,因为我从未更改过这些包。即使对site.hs
.
为什么堆栈重建这些包?有什么办法可以减少重建时间?
谢谢你。