一个目录中的多个 Haskell cabal-packages
在一个目录中包含多个 cabal 包的推荐方法是什么?
原因:我有一个包含许多可分离模块的旧项目。由于最初它们只形成一个程序,因此将它们放在同一目录中以便于编译非常方便,而且现在仍然如此。
选项
- 只是忍受并将所有内容(包括保存内容的 VCS)拆分到不同的目录中吗?
- 破解 cabal 直到它对同一目录中的多个 .cabal 文件感到满意?
- 为每个模块创建另一个子目录并将 .cabal 文件以及原始代码片段的符号链接放在那里?
- 有更聪明的东西吗?什么?
What is the recommended way of having several cabal packages in one directory?
Why: I have an old project with many separable modules. Since originally they formed just one program it was, and still is, handy to have them in same directory for easy compiling.
Options
- Just suffer and split everything, including VCS holding the stuff, into different directories?
- Hack cabal until it is happy with multiple .cabal files in same directory?
- Make another subdirectory for each module and put .cabal files there along with symlinks to original pieces of code?
- Something smarter? What?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为了清洁,我不得不推荐选项 1 或 3。我不确定如何解决这个问题,如果有办法解决这个问题的话。
I'd have to recommend option 1 or 3 for cleanliness. I'm not sure how to get around this, if there is even a way to get around this.
我想说的是 1 的修改选项:所有内容的子目录,没有符号链接,但将所有内容保留在单个 VCS 下。
这个问题在 Cabal 2 的问题列表中。
I'd say a modified option of 1: subdirectories for everything, no symlinks, but keep everything under a single VCS.
This problem is on the issue list for Cabal 2.
我建议这正是 Leksah 工作空间的设计目的。只要掌握 Leksah,剩下的事情就会迎刃而解。
I would recommend that this is exactly what workspaces in Leksah were designed to do. Just get your hands on Leksah and then the rest will sort itself out.