- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我希望能够import
或using
在我的主Julia REPL/另一个项目或环境中的目录~/projects/ExamplePkg
中编写的包。
最佳答案
]foo
的意思是“在Julia Pkg REPL上使用foo命令”。在Julia REPL上键入]
以输入Pkg REPL。使用]help <command name>
获取更多信息,或查看下面的链接。
确保您的程序包具有一个Project.toml并为其提供一个UUID并对其进行命名(使用Julia REPL的]generate
或PkgTemplates程序包生成一个),并且该文件位于git repo中,且至少包含一次提交(包括所有相关文件) 。
然后选择您想如何使用该软件包。
您可能想运行]dev ~/projects/ExamplePkg
:
If
dev
is used on a local path, that path to that package is recorded and used when loading that package. The path will be recorded relative to the project file, unless it is given as an absolute path.
dev
并更改了
dev
d程序包中的依赖项,则可能应该在所有依赖于该程序包的环境中运行
]resolve
。
]add ~/projects/ExamplePkg
:
Instead of giving a URL of a git repo to
add
we could instead have given a local path to a git repo. This works similarly to adding a URL. The local repository will be tracked (at some branch) and updates from that local repo are pulled when packages are updated. Note that changes to files in the local package repository will not immediately be reflected when loading that package. The changes would have to be committed and the packages updated in order to pull in the changes.
]add
编码,则可能会得到
ERROR: GitError(Code:EUNBORNBRANCH, Class:Reference, reference 'refs/heads/master' not found)
。不幸的是,Julia可能已经缓存了不良 repo ,因此您需要将其从
~/.julia/clones/<gibberish>/
中删除。您可以使用grep找到要删除的目录:
$ grep ExamplePkg ~/.julia/clones/*/config
。
关于julia - 如何在Julia的导入路径中添加本地项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59571690/
我是一名优秀的程序员,十分优秀!