Godep

agolangf · · 1437 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi all<br/> Are you guys using Godep tool?</p> <p>Thanks</p> <hr/>**评论:**<br/><br/>skelterjohn: <pre><p>(self promotion, since I created wgo)</p> <p>I think that godep is the wrong approach. It tries to stick dep management <em>inside</em> of &#39;go get&#39;. Specifically, the fetched package will have a subdirectory for the workspace, and to build that package properly you really have to treat it as primary (eg, run &#39;godep go install&#39; from inside that package&#39;s directory so that it can use the internal workspace).</p> <p>But because of how Go works, you cannot have conflicting versions of a package in the same workspace. They&#39;re different packages, their types won&#39;t be compatible, and people are likely to get confusing errors.</p> <p>Package versioning really needs to happen on a workspace level. That&#39;s the approach that <a href="https://github.com/skelterjohn/wgo" rel="nofollow">https://github.com/skelterjohn/wgo</a> (and also gb, if you&#39;ve heard of that). It manages the workspace for you, and has some tools to vendor and to pin versions. So, it&#39;s the <em>workspace</em> that has the versioning, rather than the package. There is only one king, and it&#39;s the workspace :)</p></pre>anoobisus: <pre><p>Literally took me less than 20 minutes to update ALL of my Go projects to davecheney&#39;s <a href="http://getgb.io/" rel="nofollow">gb</a> tool.</p></pre>pierrrre: <pre><p>Can you make a &#34;go gettable&#34; project with gb?</p></pre>anoobisus: <pre><p>It&#39;s specifically not supported. And for &#34;applications&#34; rather than small libs, it makes sense.</p> <p>The one &#34;lib&#34; I have has NOT been ported over to GB. If it had external dependencies... I&#39;d have to evaluate what the best plan of action is.</p> <p>edit: actually, the FAQ addresses this better now: <a href="http://getgb.io/faq/" rel="nofollow">http://getgb.io/faq/</a></p></pre>tehbilly: <pre><p>This is my major beef with gb. Being able to install or update a binary with a quick &#39;go get&#39; is a lifesaver. I work on a variety of platforms and can manage my go based applications in a uniform way.</p> <p>To be fair, I&#39;ve only once been bitten by a problem using a single shared workspace. If gb can generate a stub main.go in the repository root that I can run I&#39;d consider it, as I can live with running two command to install a binary. &#39;go get -d ...&#39; Then &#39;cd ... go run main.go&#39;</p></pre>anoobisus: <pre><p>same thing with gb though:</p> <pre><code>git clone http://github.com/project/repo cd repo gb build all ./bin/&lt;Binary name&gt; </code></pre> <p>It&#39;s &#34;four&#34; commands instead of &#34;two&#34; but I hardly think that really counts here.</p></pre>james-h: <pre><p>I&#39;m not, though I&#39;m not dealing with production systems at the moment. However, I believe that <a href="http://getgb.io" rel="nofollow">gb</a> might be a better option.</p></pre>zero_coding: <pre><p>why gb tool is a better tool then godep?</p></pre>lavalamp945: <pre><p>One star, would not recommend.</p></pre>sharptierce: <pre><p>yes</p></pre>pierrrre: <pre><p>yes</p></pre>

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

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