doubu4406 2018-03-05 18:24
浏览 34

忽略并阻止使用go dep删除供应商的软件包?

I have a bit of an issue, I have a Go project that I depend on (DPkg) and this project has some small dependency on another package (TPkg).

For some reasons which is irrelevant to the question I am not able to build TPkg at the moment however I know that I do not ever use the parts of DPkg that call TPkg so I went ahead and recreated a fake DPkg in my vendor folder.

The issue is that whenever I run dep ensure, dep will attempt to handle this package. I have attempted setting an ignored constraint on it in my Gopkg.toml but then dep just deletes my code in the vendor folder. I have also tried further adding a prune.project constraint to mark TPkg as unused-packages = false but that does not prevent dep from deleting the package.

Is there any way that I can tell dep to ignore TPkg completely and by that I mean, don't attempt to change it or delete it?

I know what this means and how bad it is in terms of issues and maintainability but that is not the question at hand here.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 一道python难题2
    • ¥15 一道python难题
    • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试
    • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
    • ¥15 教务系统账号被盗号如何追溯设备