News for hackers. Stuff that matters.
Re:Fix the versioning by hawkice on Friday August 29, 2014 @06:19PM (#8244760)
I am concerned the primary purpose of this being on the frontpage is shaming someone.

I'm a big fan of semver, but I also test whenever I do a rm Gemfile.lock; bundle install (I've only managed a fairly small nodejs app in production, but I'd be surprised if people really don't test something like that). So he did something we think is bad -- but plenty of beginning engineers do this all the time, and while the discussion on github is appropriate, I'm not sure it belongs here on HN. People shouldn't be afraid of making something useful (as underscore is) because of the potential for extremely public shaming.

Re:Fix the versioning by akerl_ on Friday August 29, 2014 @06:26PM (#8244789)
The larger discussion about whether or not package maintainers have a responsibility to minimize user frustration at the cost of their own opinions and practices is worthwhile.

If I'm the author of an unpopular module, where I am the sole user, and I don't like semantic versioning or some other facet of package management, I don't follow it. Should I be expected to change my stance just because other people begin using my project? At what point is my project's community large enough that maintaining a healthy ecosystem involves sharing some control over the practices with that community?

It also doesn't help here that rather than having a rational discussion, the author released what can only be described as a troll package, where every version change becomes a major version. Using that would be the height of insanity, as noted in the issue thread, because all libraries would need to update their dependencies and re-release with every Underscore-semver release, due to dependency version conflicts.

Re:Fix the versioning by rubiquity on Friday August 29, 2014 @06:30PM (#8244805)
> It also doesn't help here that rather than having a rational discussion, the author released what can only be described as a troll package, where every version change becomes a major version.

What exactly about Jeremy Ashkenas makes you think this was done as a way to troll people? He still took a lot of time to make release notes and note all of the changes.

Re:Fix the versioning by akerl_ on Friday August 29, 2014 @06:32PM (#8244813)
I was referring specifically to the underscore-semver package, not the Underscore project as a whole. Using it in actual projects isn't feasible in any way, because it would require that your project and any project you depend on that also depends on underscore-semver specify the exact same version, or else we're back with the same problem as before. And since you won't be a package maintainer for everything your depend on in most cases, that isn't feasible.

He's not released a version that obeys semver, he's released a version that treats any update as a breaking change.

Re:Fix the versioning by rubiquity on Friday August 29, 2014 @06:36PM (#8244827)
Ah, I didn't realize you were talking about underscore-semver. I'm sure that was done tongue in cheek.

> He's not released a version that obeys semver, he's released a version that treats any update as a breaking change.

SemVer isn't a law. It's a set of guidelines for versioning software in a slightly less arbitrary way. Maybe extra precaution could be taken for something as common as underscore, and to me that is the only argument worth having here.

Re:Fix the versioning by akerl_ on Friday August 29, 2014 @06:44PM (#8244850)
Maybe I'm biased by not having a widely used open source project, and my judgement is thus clouded by wanting to one day have a community of users for something that I've written.

That said, I do write code and have tools that are used by other groups of people, and have experienced feature requests and suggestions and patches that I don't necessarily agree with, and I've always tried to step back and consider the overall impact on the project rather than my personal preconception of what the project "should" be. I've merged features that I'd never use and adjusted things to make my project more friendly for users who aren't me.

I think that one of the greater things about open source projects is that over time the original author can focus more on the fun parts or on guiding the overall direction of the project, because the community can provide assistance with identifying issues and maintaining existing systems. Whether the version number is 2.0.0 or 1.7.0 or 50.0.0 is such a trivial thing, and as a developer I'd imagine I'd make my choice based on what made my project more usable for the community.

Re:Fix the versioning by gojomo on Friday August 29, 2014 @06:46PM (#8244860)
I think underscore-semver is "ha, ha, but serious". It does fix the problem of protecting people from what might be breaking changes, while freeing the author from having to carefully track changes. It implies: you should upgrade your Underscore if and only if you've made a conscious, aware decision to do so.

I think it's OK for an open-source project – a freely-offered gift to the world – to take that approach, if the author prefers to be personally indifferent about "breaking changes". It's a sort of technical declaration of "NO WARRANTIES", specifically no warranty of "FITNESS FOR A PARTICULAR PURPOSE" – that purpose being, "painless drop-in where a previous version was used".

Re:Fix the versioning by akerl_ on Friday August 29, 2014 @06:59PM (#8244904)
Yes, but due to the nature of dependencies, it becomes crazy to use in practice. Imagine I write "leetapp", and it depends on "underscore-semver 170.0.0", "tablething 1.0.0", and "otherstuff 2.1.3". Except tablething also uses underscore, so it too depends on "underscore-semver 170.0.0". Now Underscore puts out a new version. I cannot update my app to use 180.0.0 until tablething's devs also do so, or else our dependencies will not be resolvable. This isn't too bad if I only have one dep, but what if I have 20 dependencies that all, somewhere in their dependencies, need underscore-semver?

This is the reason that semver and ranges of dependency management became useful in the first place, because I can say that leetapp needs underscore-realsemver (1.6.0-1.6.n), and tablething can say it needs version (1.6.3-1.6.n) and so forth. This works with sane semver because we can use the parts of the version string to agree on the major API while allowing bugfixes and other improvements to happen without every project needing to bump version numbers.

Re:Fix the versioning by bryanlarsen on Friday August 29, 2014 @07:14PM (#8244969)
It depends on what package manager you are using. NPM would allow tablething to use 170.0.0 while leetapp used 180.0.0. Most of the discussion about underscore has been in the context of NPM. Of course your point still stands, because underscore is available in many other package managers, and is very often used without a package manager at all...
Re:Fix the versioning by jashkenas on Friday August 29, 2014 @09:23PM (#8245251)
The Underscore-semver package is a bit of a troll package — it's the literal-minded SemVer way of versioning Underscore.

Historically, nearly every single release has had at least one thing that mildly changed the behavior of some minor edge case or other. So by strict SemVer, if we wouldn't be at version "170.0.0" by now, we'd be damn close to it.

Re:Fix the versioning by markdodwell on Friday August 29, 2014 @10:47PM (#8245430)
Why does that matter? Are big numbers inherently bad?
Re:Fix the versioning by abritishguy on Friday August 29, 2014 @06:32PM (#8244810)
A maintainer did that.
Re:Fix the versioning by krebby on Friday August 29, 2014 @06:57PM (#8244899)
Yup. I'm the contributor who wrote that pull for the release. You can see the original here https://github.com/jashkenas/underscore/pull/1799
Re:Fix the versioning by kaoD on Friday August 29, 2014 @10:21PM (#8245365)
Well, I'm glad this got to frontpage. I don't know if the purpose was shaming someone (it didn't even cross my mind) but it made me reflect on how my versioning affects others.

I knew this was going to happen when NPM went from default ~ in dependencies (update only patches) to ^ (update minor versions). In fact, I changed my default back to ~ out of fear this would happen.

Re:Fix the versioning by mmanfrin on Friday August 29, 2014 @06:27PM (#8244796)
I think the problem is that it completely halts development of anything that uses a module that uses underscore (or even a module that uses a module that uses underscore, ad infinitum) since many modules have their dependencies written in such a way that npm will install 1.7, despite it not being compatible. This seems important enough to be something of a public-shaming.

edit: Please comment saying why you disagree, rather than simply downvoting.

Re:Fix the versioning by gojomo on Friday August 29, 2014 @07:00PM (#8244909)
"Public shaming" of someone who's been as productive and generous with his open-source work as Ashkenas is never appropriate.

Respectfully disagree on the particulars, sure, but don't imply that someone who's given you a gift now owes you extra work, when their own design sense – the same thing that created the shared bounty – guides them otherwise.

People should also consider that authors of popular projects are inundated with support requests and demands for their time, and have to set some boundaries on their efforts, which may appear callous to outsiders. If his boundary here is not wanting to embrace Semantic Versioning, respect it, and fork/migrate/workaround rather than whine/shame/guilt.

Re:Fix the versioning by abritishguy on Friday August 29, 2014 @06:21PM (#8244768)
This is the most depended upon node module on npm, this is not some beginner engineer - I think this belongs here.
Re:Fix the versioning by hawkice on Friday August 29, 2014 @06:24PM (#8244778)
If the purpose is to alert people to perhaps subtle bugs in their code, then clearly it's relevant to the engineers here.

But if your point is that we should publicly highlight mistakes (or things we don't like) in packages because we expect people to do better... then I guess I should step out of this conversation. I don't want to talk highschool about someone building cool things.

Re:Fix the versioning by akerl_ on Friday August 29, 2014 @06:30PM (#8244807)
The connection between a project's developers and its community is noteworthy and worth discussing.

As a developer, how you treat your user base is relevant, and has a real impact on the value of the thing you have produced. We have successful projects whose leaders vary wildly in style, from Linus's approach to kernel development to projects that delegate final code control to community contributors.

Talking about the human elements that factor in to technology has merit; talking about the best ways to handle a project's community has merit. It's not "talk[ing] highschool".

Re:Fix the versioning by rubiquity on Friday August 29, 2014 @06:27PM (#8244797)
We could also submit a link to your issue on GitHub with the title "Engineer Mindlessly Updates Dependencies and Deploys Without Testing, Shocked to Learn Application Doesn't work."
Re:Fix the versioning by abritishguy on Friday August 29, 2014 @06:35PM (#8244819)
I started a new repo and wanted to know why several of the dependencies were not working, only way to fix it was to manually change the underscore version number in these dependencies - obviously you wouldn't just push an update to production without testing it.
Re:Fix the versioning by grayclhn on Friday August 29, 2014 @08:14PM (#8245113)
I think you'd find that it falls off the front page pretty quickly.
Re:Fix the versioning by tedunangst on Friday August 29, 2014 @06:25PM (#8244785)
Yes. Not that I had any plans to write node modules, but I sure as fuck don't want to now, lest somebody discover my work and start using it and then telling me how I need to do things.
Re:Fix the versioning by iends on Friday August 29, 2014 @06:34PM (#8244817)
https://www.npmjs.org/browse/depended

_ is the most depended on node.js module. Maintainer, Ashkenas, introduced breaking changes. By default npm will pull down these changes without prompting because it was designed to follow semver. Maybe npm is at fault. Maybe it's Ashkenas.

However, Ashkenas knows his change is going to break people and just doesn't care.

Re:Fix the versioning by tedunangst on Friday August 29, 2014 @06:55PM (#8244890)
Did the same thing not happen with 1.6? And 1.5? Who thought 1.7 would be different?
Re:Fix the versioning by __david__ on Friday August 29, 2014 @09:54PM (#8245314)
Or perhaps the fault lies with the people who update their dependencies blindly and then don't run tests. Not locking your dependencies down is a recipe for breakage.
Re:Fix the versioning by iends on Saturday August 30, 2014 @08:30AM (#8246267)
I suppose I shouldn't start new projects, either?
Re:Fix the versioning by __david__ on Monday September 08, 2014 @04:07PM (#8286925)
How does that follow?
Re:Fix the versioning by iends on Monday September 08, 2014 @04:24PM (#8287006)
When you started a new project and pulled down new packages, all the packages that depended on underscore functionality that changed were broken because of this change. That's because NPM makes assumptions about major/minor versions and those packages pulled down the incompatible version.

You can suggested that every package on npm vender their own dependencies, but in practice nobody does this because npm is known to make these assumptions.

Re:Fix the versioning by iends on Friday August 29, 2014 @06:31PM (#8244808)
Sadly, Jeremy Ashkenas is not a beginning engineer. He's just acting like one (or just trolling and wants everybody to switch to lodash).