Godeps - Slow build times

polaris · · 680 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>After I set up Godeps for my project (per Heroku&#39;s instructions), my build time has increased significantly. </p> <p>Is there something I&#39;m missing? Using <code>go run main.go</code> to rebuild/launch app while programming locally. Frustrating that it now takes ~30 seconds instead of ~1 second before</p> <p>go version go1.5.3 darwin/amd64</p> <hr/>**评论:**<br/><br/>abcded1234234: <pre><p>Try running <code>go install</code> once. This will build and cache (to $GOPATH/pkg) all your dependencies so next time you run <code>go run</code> it will be significantly faster.</p></pre>kwvarga: <pre><p>Nice. Seems to be working much better.</p></pre>mdmd136: <pre><p>I&#39;ve noticed similar (and other issues) with godeps. Maybe try using godeps with the vendor experiment enabled (i.e. only godep restore/save to place dependencies) and just build with the go tool. I&#39;ve also heard good things about gb.</p> <p><a href="https://github.com/constabulary/gb" rel="nofollow">https://github.com/constabulary/gb</a></p></pre>robvdl: <pre><p>... except that gb requires you to setup a slightly non-conventional project directory structure (with a src directory in your project root for example), it&#39;s not for everyone, it works fine with application style projects, but not so much libraries I have found, I don&#39;t really like gb myself because it breaks Go conventions.</p> <p>If you&#39;re starting fresh, you might want to look at Glide over Godep, I am using Glide with Go 1.5 vendor experiment myself, after I read a lot of good things about Glide and it becoming the preferred tool.</p></pre>robbles: <pre><p>I tried a bunch of the pre- and post-vendor experiment tools, and so far Glide and <a href="https://github.com/FiloSottile/gvt" rel="nofollow">gvt</a> are the only reasonable ones. gvt is a bit simpler than Glide - it just manages and locks the vendor folder for you.</p></pre>mc_hammerd: <pre><p>it might be a go1.5 thing, the go 1.6 thread has more data</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

680 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传