我正在尝试将本地压缩包链接为 haskel 中的库(按照官方说明)。
uname -a
Linux N52930 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
首先,我用
stack sdist
建立我的图书馆
> stack sdist
Getting file list for /home/lsund/foo-lib/
mini-state> List of package sources written to file
mini-state> '/tmp/stack-sdist-d76f6a83de3b492a/source-files-list'
Building sdist tarball for /home/lsund/git/foo-lib/
Wrote sdist tarball to /home/lsund/git/foo-lib/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.4.1.0/foo-lib-0.3.3.2.tar.gz
Checking package 'foo-lib' for common mistakes
Package check reported the following warnings:
No 'category' field.
No 'synopsis' field.
A 'license-file' is not specified.
然后,在我的应用程序中,我链接到我的 package.yaml 中的库...
...
foo-lib == 0.3.2.0
...还有我的 stack.yaml:
extra-deps:
- archive: local/lib/mini-state-0.3.3.2.tar.gz
尝试使用安装的本地库进行构建。不再生成错误输出。任何帮助将不胜感激
> stack install
Error: [S-713]
Mismatched file size from /home/lsund/git/pfin/local/lib/foo-lib-0.3.3.2.tar.gz
Expected: 2546
Actual: 2503