New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag release versions #6
Comments
You pose an interesting question: Why not tag release versions? I've got a couple open source libraries. Some of them are pretty big projects (like XMPPFramework). With the big projects I do typically tag major releases. But with the smaller libraries (like CocoaAsyncSocket, CocoaLumberjack) each commit is stable, and presents a small improvement upon the previous revision. In cases like this, I usually avoid using tags... But adding tags can't hurt, right? Well, yes and no. And here's where I'd really like to get your expert feedback. In the past I did always use tags. But as each commit was a minor improvement, there weren't many times when I felt the need to go tag a new major release. Over time, the notion of tags was nearly forgotten. But every so often I have a discussion with someone that went something like this: Dev: "I'm seeing this bug that does ..." So my fear is that if tags are present, users will get the notion that they should only use the most recent tag. And only update when I tag a new version. But with the smaller libraries, I'd prefer users grab the latest master, and update when possible (or just about whenever I push a new batch of commits). Thoughts? |
Hmm, yes, I definitely understand where you're coming from. Ideally, how would that be handled for something like a library manager? Would you want the package to always check out the lastest master? It gets hairy at the point where my Library A depends on your Library B. What happens if you make a major change to a method signature (or something of that nature)? I wouldn't be able to say that Library A depends on v1.0.3 of Library B. Then again, perhaps we could use the commit hash as an identifier? @alloy how do you feel about that? |
Yeah, unfortunately, I know the issue of devs not interpreting version numbers well or assigning emotional value to certain version numbers. However, arbitrary revisions as version is not a good idea for a library manager vs a proper version number (see Semantic Versioning). Let me explain how, in an ideal world ;), I’d prefer people to interact with it:
The point is that devs can easily keep track of newer versions of dependencies, by simply running Now I understand that wether or not you want to do this is totally up to you, we can tag any revision as a version, but it would be much clearer to everyone if the version can be traced back to a tag in the actual repo. I hope this makes any sense, I’m a bit wasted atm, I’ll double-check in the morning :) |
I really like this idea. Question: What if the latest tag is '1.0.7' and there have been several commits since then? Since no commits have been tagged as 1.1.X, would it pull these iterations? Or does it not pull since there aren't any new tags? And if a 1.1 tag was added, would it pull the latest commit prior to that tag? |
It won’t pull any newer commits, just exactly what’s specified in the pod spec. It’s not possible to know if the dev of the lib is making API changes on branch X, so assuming newer commits will be ok is going to hurt kittens ;) Note, though, that it is very likely that in the future it will be possible to optionally use the ToT of a lib, it just hasn’t been implemented yet. This is also because it would only work if the author of the lib keeps a copy of the pod spec in the repo that’s up-to-date for the required source files at that point in time. This is something I’d like lib authors to start doing anyways, but before I start asking that I want to make sure the basics work well and supply a few tools to make it easy for lib authors to generate/push newer specs. |
PS: Since Mike has added your lib to the specs I have started using it. I like it. Thanks! :) |
First : that's hilarious. Second : good point. So when I do make an API change, I'll be sure to:
And if I don't make any API changes, but have several revisions since the last one, then it's probably just good practice to eventually tag another commit. (in other words, I'll stop being so lazy) P.S. - I've added tags. |
Yeah, that sounds about right :) Awesome, thanks a lot! |
I recently added CocoaLumberjack to the CocoaPods package manager.
Since CocoaLumberjack doesn't currently have a discreet version, I treated the current commit as the 1.0 release. Would it be possible to have this commit tagged as v1.0 (or whatever version you feel comfortable with)? This will help greatly in dependency resolution.
Thanks!
The text was updated successfully, but these errors were encountered: