douchui3933 2014-11-12 23:40
浏览 26
已采纳

golang和godep:使用godep时,在golang依赖项更新后进行Build \ install?

I have followed the instructions @ https://github.com/tools/godep regarding updating a dependency but when I go to build\install using the altered version it has not been updated within Godeps/_workspace/pkg

So I have

go get github.com/golang/glog
godep save
godep go install

and I can see

  1. The modification timestamp in Godeps/_workspace/pkg/linux_amd64/github.com/golang/glog.a
  2. The rev commit value in Godeps/Godeps.json

but now when I want to update I follow the instructions

go get github.com/golang/glog
godep update github.com/golang/glog
godep go install

I observe the following

  1. The Godeps/Godeps.json rev commit has been updated
  2. Godeps/_workspace/src/github.com/golang/ source is updated
  3. But the file timestamp for odeps/_workspace/pkg/linux_amd64/github.com/golang/glog.a is not updated hence we are using the previous version

I believe I should add a .gitignore entry for pkg and bin, which means we would do a clean build on a fresh git clone

I know I could do a rm -r on both the pkg and bin directories before the godep go install command

Is this expected behavior ?

Thanks in advance Pat

  • 写回答

1条回答 默认 最新

  • dousui6488 2015-01-05 23:13
    关注

    FYI

    Since golang v1.4 I can now use the -a flag for the go install command, since it now longer tries to rebuild the standard library, see the v1.4 release notes section on the change to the build -a flag

    Obviously this does not apply in pre v1.4 as it will attempt to rebuild the standard library packages

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。