如何重建我下载的已编辑的perl6模块?

Mor*_*ayJ 10 module build perl6 zef raku

我安装了Time :: Duration,但大多数测试失败了.我希望能够从本地存储的模块重建模块 - 使用我的编辑.

我编辑了包含模块的文件(对应于Duration.pm6):

~/.perl6/sources/D00C101A0157E3EAC494310C9961F299240423E7
Run Code Online (Sandbox Code Playgroud)

然后尝试通过它的json文件构建:

zef --debug build ~/.perl6/dist/83839D8D315EEDEDFEAF211EE42E8D936ACE29CB
Run Code Online (Sandbox Code Playgroud)

返回:

===> # SKIP: No need to build Time::Duration:ver<2.00>
!!!> Build failure: ~/.perl6/dist/83839D8D315EEDEDFEAF211EE42E8D936ACE29CB at ~/.perl6/dist
Run Code Online (Sandbox Code Playgroud)

我希望这可以通过我对源代码的改变来重建模块.

我做错了,还是我完全错了?

uge*_*exe 12

已经注意到,您不应该修改已安装的文件.但是,测试某些模块更改的工作流程非常简单.

第一:

# Fetch and extract the distribution, then change into its directory.
# If the distribution is still in zef's local file cache then it will
# skip the fetch and extraction steps.

zef look Time::Duration
Run Code Online (Sandbox Code Playgroud)

然后:

此时,您可以编辑所需的任何文件.

最后:

# test your changes without reinstalling (assumes all dependencies are installed)
zef test .

# Reinstall the modified version of Time::Duration using one of the following:
zef install . --force-install
zef uninstall Time::Duration && zef install .
Run Code Online (Sandbox Code Playgroud)

  • 然后提交一份Pull Request,将您对主要回购的更改?;) (3认同)
  • @Scimon不适合这个工作流程,因为获取的内容不一定是git repo.另外,git存储库的提取阶段从临时目录到zef存储缓存执行`git checkout`,它不会设置例如`.git /`目录(我们也不想要`.git /`文件夹zef商店缓存).`zef浏览zef bugtracker`和`zef浏览zef源`有点帮助,但只有当目标分布中填写了适当的元字段时(`Time :: Duration`没有). (3认同)

che*_*nyf 6

你应该git clone代码或下载zip包,编辑你想要的代码,然后zef install .如果当前目录有一个META6.json文件.

  • 好的,然后使用zef --force-install install.完成一次后更新更改? (2认同)