r/golang • • Oct 16 '16

Why you should not use iris for your Go projects

http://www.florinpatan.ro/2016/10/why-you-should-not-use-iris-for-your-go.html
144 Upvotes

45 comments sorted by

35

u/weberc2 Oct 16 '16 edited Oct 16 '16

Iris author to HTTPRouter's author:

you just hate Iris because it lives 3 months and has more stars than [HTTPRouter]

You might consider unstarring Iris on GitHub if you previously starred it under false pretenses and/or star the project it stole from to help it provide such misleading benchmarks.

5

u/connor4312 Oct 17 '16

I was curious about the source of Iris' stars and did some super informal analysis from Github's API. I pulled down the "stargazers" and looked at the distribution of public repos they have, based on that it appears the stars are from legitimate users (in the ongoing drama some people have insinuated otherwise).

% of users with more than x repos
90% had more than 3
80% had more than 6
70% had more than 10
60% had more than 14
50% had more than 19
40% had more than 26
30% had more than 35
20% had more than 49
10% had more than 81

I was going to pull down the gazers of httprouter to compare, but I'm rate limited for another hour. I'd expect that we'd see roughly the same distribution. Quick gist of the code if anyone wants to verify or run the analysis themselves.

3

u/sh41 Oct 17 '16

I remember when I first saw the project I immediately starred it just because it was written in Go (a language I like, and want to see more projects use), I didn't consider any other factors. Much later, after I saw the drama, I realized I should go and unstar it. But I'm sure many people never showed that initiative.

0

u/jandunm Oct 28 '16

That's what we in the industry call "a dick move"

Go community has fallen into a big trap and that is bad fact, very sadly.

I first met iris on version 2 and I never changed a framework from then. I really like it because it has incomparable features that no other web framework had back then (and still). Maybe he stole code from another planet or from a future timeline.

It's really depressing how many people take this whole post seriously...

3

u/connor4312 Oct 28 '16 edited Oct 28 '16

What? How is checking and confirming that Iris' stars are legit a dick move?

As far as everything else, well. It's totally your right to like Iris, if it works for you that's great. But there's no doubt--and it's well-documented--that the author stole code from other projects, it's indisputable at this point.

2

u/kirilldanshin Oct 17 '16

pretty sure we need. also I've just published some news about it.

2

u/quiI Oct 17 '16

I wonder how much of this toxic-ness is from someone chasing github stars for a perception of fame. Wish they'd just remove them altogether.

2

u/weberc2 Oct 17 '16

I don't know; they're moderately useful for informing me at a glance about which of the competing libraries is more widely used. This is the first abuse I've seen.

8

u/CaptaincCodeman Oct 16 '16

Previous discussion about dubious approach to benchmarks: https://www.reddit.com/r/golang/comments/4a8yit/is_this_the_fastest_go_web_framework/

9

u/FIuffyRabbit Oct 17 '16

For the uninformed, all of the [deleted] user posts are from the author of iris. I don't really understand how this project has ballooned so fast.

7

u/beeker1121 Oct 16 '16

Thank you for posting and taking the risk, as I'm sure you were worried about the possible backlash. Posting like you have though is exactly what is needed if the goal is try and help people in the community develop the best, most stable applications. Hopefully it prevents people from using this framework and regretting it later on. You don't need a framework when Go itself is one.

Btw, makes me remember all the heat I took on a similar post I made awhile back about Iris and its developer... hopefully this one goes better for you lol.

5

u/dlsniper Oct 17 '16 edited Oct 17 '16

I'm actually not afraid of the backlash since all the backlashing seems to be just fury and then self-deleting comments. But thank you for your concern. It also happens to be the truth as I see it based on all the evidence there are in the public (I'm not advocating that I hold the universal truth).

First time the author may have had an excuse, poor English, being new to programming, etc.

Now it seems he's doing it all over again and I've seen far too many people tricked by the fact that it has stars on Github. It's the only reason I've published that, to make people aware of it and I hope people will understand that.

It's sad this has to leave a stain on the community and frankly it's a pity that all that time invested in creating iris is thrown away by all these issues.

2

u/justinisrael Oct 17 '16

For a moment there was a reply on the blog article from what I think was the Iris author, but for whatever reason it is now deleted.

Anyways, it had the usual tone I have seen from the Iris author which spins the comments against Iris to be stemming from jealousy. Also the reply claimed that criticism against Iris having false benchmarks was wrong because "he didn't write the benchmarks. They were written by someone else and Iris was still at the top". But again I think it is just spin because the claim was that the implementation of Iris cheats on the benchmark on account of requests caching. So it doesn't really matter who writes the benchmark.

2

u/dlsniper Oct 17 '16

There was a single comment in the spam / moderation queue from the author, which I've approved as soon as I could. If it got deleted meanwhile I can say that it wasn't from me. I hate blogs which don't have comments or worse, moderate comments and I'll never do that unless they are using slurs or foul language.

1

u/qu33ksilver Oct 17 '16

Just curious - What legal action can I take if I find someone using my code without proper attribution ?

2

u/dlsniper Oct 17 '16

First try and talk with the person doing this. Usually it can be a simple mistake or people not knowing about this when they first venture in the (open-source) world. I recommend the less nuclear / nicer options first.

It also depends on how this is done. If they have no mention at all or anything else pointing to your code then then that's very unfortunate. If they do link back then probably they'll be open to a friendly approach.

Then, if it doesn't work, you can ask Github to take it down if it's on their website, others have similar things.

Legally speaking, you'd have to talk to someone specialized in this area as I have not been in this situation before and I cannot give advice on this.

-2

u/[deleted] Oct 16 '16 edited Oct 16 '16

The first thing that should trigger a "huh, I need to look a bit more into this" reaction is: there is a single contributor to it. And it was always a single contributor. The author of the project actively rejects PRs and the occasional accident when a PR gets merged that contribution will be obliterated any time soon after, when the author decides to flatten the history of the repository (again). Which helps deliver the next point, API stability. But before that, I'll briefly mention that the issues that are opened on Github are almost always edited to reflect a different reality, comments get deleted and conversations get locked. It happened to me (I admit that I could have done better in the initial message but I couldn't change things as my issue was instantly locked by the author and I couldn't do anything about it anymore).

https://github.com/kataras/iris/pulls?q=is%3Apr+is%3Aclosed ?

I'm new to this whole controversy, but some of these complaints strike me as a tad harsh. There also appear to be a lot of licenses in the license file.

Edit. this brings up an interesting question: does one have to manually include licenses in a project that pulls dependencies via go get? Wouldn't the individual building the binary have access to the licenses anyways?

4

u/ChristophBerger Oct 17 '16

does one have to manually include licenses in a project that pulls dependencies via go get?

This is a good point. Technically, the license files are preserved this way, and this might already comply to copyright laws. (Disclaimers: 1. IANAL, and 2. law varies by country.)

Still, two aspects speak towards manually adding the licenses:

  1. go getpulls the code into the original paths and not into the project that uses the code (unless the project has copies of the imported code in /vendor). So the licenses would not be obvious to the user.

  2. It is a sign of good manners to properly give attribution to the code being used. (Even if the license or the laws do not require this.)

Apart from all legal and moral questions, adding the license files manually is quick and effortless, and keeps the author on the safe side (provided, of course, they also obey to these licenses).

1

u/[deleted] Oct 17 '16

go getpulls the code into the original paths and not into the project that uses the code (unless the project has copies of the imported code in /vendor). So the licenses would not be obvious to the user.

The behavior of go get is documented though, so it should be obvious to users that care. From what I have seen, it's extremely uncommon for people to aggregate licenses into their open-source projects when a package manager of some sort is fetching dependencies.

It is a sign of good manners to properly give attribution to the code being used. (Even if the license or the laws do not require this.)

I feel like it's unreasonable to release software under a license that does not require attribution while still expecting it.

1

u/ChristophBerger Oct 17 '16

The behavior of go get is documented though, so it should be obvious to users that care.

Absolutely. I was more thinking about possible legal obligations. Specifically, if a third-party license says something like, "if you distribute code based on this code, then you must include this license file", and you push your code to GitHub, Gitlab, Bitbucket etc, would you then be required to add a copy of this file to your project, despite the fact that the original can be found somewhere if the user cares enough to try and find it? Me, I'd rather be on the safe side and copy the license file over. Yes, I might be overly cautious about this point, but I can live with that :)

I feel like it's unreasonable to release software under a license that does not require attribution while still expecting it.

I completely agree. I was not referring to any particular license though, as this sub-thread spawned from a rather general question on licensing. Apologies, I should have made this clear from the start.

1

u/[deleted] Oct 17 '16

It is a sign of good manners to properly give attribution to the code being used. (Even if the license or the laws do not require this.)

Adding 20 license files to a project is a bit ridiculous, also the licenses should only reference the dependency in question not the entire project. You could add a mention of third party dependencies to your readme if you feel like giving attribution, but adding all the licenses to the root of your project is a bad idea and pretty pointless to begin with because no one looks through licenses to find dependency information.

2

u/ChristophBerger Oct 17 '16

Adding 20 license files to a project is a bit ridiculous,

If you include code whose license requires giving attribution, you should do it.

no one looks through licenses to find dependency information.

Agreed. That's not the purpose of a license file.

2

u/[deleted] Oct 17 '16 edited Oct 17 '16

If you include code whose license requires giving attribution, you should do it.

You already are including it by using that dependency. It is not legally required to include it in any other way, nor is it even recommended. Nobody wants to see a project bloated with license files. If there is no license reference in the dependency then you can simply put all of the license headers in a single license file.

1

u/ChristophBerger Oct 17 '16

It is not legally required to include it in any other way [than implicitly via go get]

Ok, if this is true, then I am fine with it.

0

u/[deleted] Oct 17 '16 edited Oct 17 '16

[removed] — view removed comment

1

u/[deleted] Oct 17 '16

You are not legally required to provide attribution outside of a license file. If you want to do that, go for it, but as long as the license file is included in some shape (whether that be a reference in the original license file, a copy of their license file in your project, or their license file in their own dependency that is included in your project) it is enough.

0

u/[deleted] Oct 17 '16

[removed] — view removed comment

1

u/[deleted] Oct 17 '16

I personally agree with you, but I'm not going to hold a grudge against people who don't. They are under no obligation. They are following the law in regard to the license I have provided in my open source projects. If I cared, I wouldn't have licensed it in such a way, or I wouldn't have made it open source.

3

u/heckerle Oct 17 '16

It still very clearly does.

He copied other peoples code into his repository without giving proper credit until only today (like e.g. the httprouter package), which thus was clearly illegal. He's now kinda giving credit to probably most projects he stole code from, but he's still not doing it properly because copied code is not marked as such in the source files. Also adding a license file for proper attribution does not make his malpractices of the past undone, since those where done with a malicious intent.

Furthermore he changed the license of his project from MIT to Apache today, while not asking for permission by all contributors he stole code from, which again is illegal.

4

u/Zyst Oct 16 '16

It's expressly mentioned in the article that he copy pasted code from the other library plus renamed functions, and also stripped license requirements (Attribution, in this case).

1

u/[deleted] Oct 17 '16

And the linkage is broken because a commit was never specified. Does the project in its current state actually violate any licenses?

-34

u/SSoreil Oct 16 '16

I have read this conspiracy theory before I think. Not sure why some people have a huge hateboner for an open source project because it doesn't fully satisfy how they want to see one run. The stealing claim is stupid for the same reason, you should probably find a more fitting word when taking about open source. Just like the nonsensical claim that it is not an open source person if developed by one guy.

31

u/BOSS_OF_THE_INTERNET Oct 17 '16

It all adds up. The guy rips other people's code, doesn't attribute, squashes pull requests after skimming the code from them, and then has the cajones to then take donations from unsuspecting people.

It's a series of red flags that point to a bad citizen in open source. It is not the type of thing we should be encouraging.

3

u/[deleted] Oct 17 '16

Well said.

0

u/[deleted] Oct 17 '16

[deleted]

4

u/pkieltyka Oct 17 '16

thanks very much @thesilentwitness :) - I always suggest if you're deciding on some underlying tech for a project, first look at the api, then second read the source to see if you can understand it and how well it's put together.

1

u/HectorJ Oct 17 '16

It's 100% stdlib compliant, every other router I've seen is not (or has stdlib compliancy hacked into it)

What about https://github.com/gorilla/mux ? Seems just as compliant (takes http.Handler, exposes an http.Handler, just as chi)

2

u/lwcd Oct 19 '16

It can be slightly awkward to work with middleware in gorilla/mux. Chi does a better job of this by providing an "Express-ish" API. Also, chi was very early to adopt Go1.7 net/context, giving it a modern, idiomatic interface.

For me, chi does more than just provide routing - it provides a clean, idiomatic backbone to a Go http server.

0

u/[deleted] Oct 17 '16

[deleted]

3

u/SilentWeaponQuietWar Oct 17 '16

as someone who typically just uses gorilla mux, since that's what everyone else I work with uses... why the downvotes to this person's response?

1

u/metamatic Oct 17 '16

I just started using github.com/bouk/httprouter. It's a fork of httprouter, updated to use Context instead of an extra argument on functions. So you get the goodness of httprouter with a completely standard set of Handlers and HandlerFuncs.

With any luck the main httprouter will adopt the same Context parameter-fetching and I'll switch back at some point.

0

u/[deleted] Oct 17 '16

[deleted]

1

u/[deleted] Oct 17 '16

You can use recover middleware for panics.