Help! Go build or dep bug

blov · · 480 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I guess I have a unique case with my imports and everything. I was able to reproduce the issue here. I need to know if this is intended behavior, and if so, how should I structure my code (dependencies), or if it is a bug I&#39;ll have to report it. I get it with dep (0.4.1) and go (1.10.1) on windows (not sure if relevant).</p> <p>dependency is structured as so.</p> <p>/dep</p> <p>/a</p> <p>/b</p> <p>dep_test.go</p> <p>(I&#39;m not sure how spacing will come through with that. dep is root folder and has dep_test.go under it, as well as folders a and b)</p> <p>a and b both reference <a href="https://github.com/google/uuid" rel="nofollow">github.com/google/uuid</a>(although I&#39;m pretty sure it doesn&#39;t matter which library).</p> <p>When I include that dependency in my project, we&#39;ll call it &#34;project&#34;, I import a and b as appropriate</p> <p>import &#34;<a href="https://github.com/me/dep/a" rel="nofollow">github.com/me/dep/a</a>&#34;</p> <p>import &#34;<a href="https://github.com/me/dep/b" rel="nofollow">github.com/me/dep/b</a>&#34;</p> <p>and when i build it, I get the build error</p> <p>cannot use ID (type &#34;dep/vendor/github.com/google/uuid&#34;.UUID) as type &#34;project/vendor/github.com/google/uuid&#34;.UUID in field value</p> <p>I didn&#39;t know what to google. But I built a test repo here</p> <p><a href="https://github.com/jasontconnell/uuiddep" rel="nofollow">https://github.com/jasontconnell/uuiddep</a></p> <p>I&#39;m thinking the 2 packages used throws either go build or dep off (I&#39;m leaning go build a little bit more actually)</p> <p>PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED</p> <p><a href="https://github.com/google/uuid" rel="nofollow">github.com/google/uuid</a>0.2 0.2 064e206 0.2 1</p> <p><a href="https://github.com/jasontconnell/testuuid" rel="nofollow">github.com/jasontconnell/testuuid</a> branch master branch master 0f83cb1 0f83cb1 2</p> <p>Git clone, dep ensure, go build. If this is a known issue, that&#39;s fine, I&#39;ll just need a workaround. If it&#39;s not I&#39;d like to report it. Thanks for reading! </p> <hr/>**评论:**<br/><br/>jasontconnell: <pre><p>Reported bug on github repo. They are good about going through that list frequently and thoroughly.</p> <p><a href="https://github.com/golang/go/issues/25174" rel="nofollow">https://github.com/golang/go/issues/25174</a></p></pre>

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

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