Pinner - an experimental semver-tag based dependency manager in go

agolangf · · 540 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hello,</p> <p>Recently I was inspired to put some time into a proof of concept approach for managing dependencies and their constraints in go, sort of like how bundler works for ruby.</p> <p><a href="https://github.com/StabbyCutyou/pinner">https://github.com/StabbyCutyou/pinner</a></p> <p>The main idea is that you&#39;d define a pin/main.go file in your library or service, which would register dependent libraries and the constraint you put on their version - for example, ~&gt; 2.0.0 or = 1.3.</p> <p>Right now it does all of it&#39;s work in $GOPATH/pin_staging, and does not actually modify what is in $GOPATH/src. This is because while it&#39;s still more of a proof of concept, I didn&#39;t want to go mucking around with anyones actual src directory just yet.</p> <p>I&#39;ve included a test you can run, which references a set of straw-libs that I&#39;ve put on github to simulate how it handles recursively finding all dependencies, then resolving what versions are available, before finding the highest possible version that meets all defined constraints.</p> <p>It does not solve for, not intend to ever solve for, issues where you have an impossible set of version constraints (ex: 2 different libraries both depend on a 3rd, but incompatible versions of it).</p> <p>I would love to get some feedback on the idea and the current approach, to see how people in the community feel.</p> <p>Thanks</p> <hr/>**评论:**<br/><br/>robvdl: <pre><p>Doesn&#39;t glide already do this though, but using git tags (which seems a bit nicer to me than a .go file in a pin directory)</p></pre>

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

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