Chapel 如何处理 "includes"

How does Chapel handle "includes"

现在,如果我有两个 Chapel 项目 ProjAProjB

如果我想在 B 中使用 ProjA,我会在我的 . In 中包含 -M/path/to/ProjA 标志,但是,范例通常是包含整个库,例如boost,在系统范围内安装。 Chapel 中与此类似的是什么。有没有 chpl --compile-as-system-library 旗帜之类的东西?

What is the analog to this in Chapel. Is there a chpl --compile-as-system-library flag or something?

如果我没理解错的话,您可以通过将 CHPL_MODULE_PATH 设置为指定的公共库路径并将 Chapel 模块放入该目录来完成此操作。这将消除向所有编译添加 -M 标志的约束,例如

> export CHPL_MODULE_PATH=/path/to/ProjA
> chpl B.chpl

从长远来看,梅森不会完全解决这个问题。根据当前的设计计划,Mason 将仅在包的基础上管理依赖项,因此如果不在包清单文件中指定依赖项,它将无法使包可用system-wide。