News for hackers. Stuff that matters.

Is this how opensource usually works?

https://github.com/laravel/framework/pull/2952

I modified Laravel blade compiler: fixed few bugs and improved compilation speed in 40 times. But all what Ive got is: "we wont pull it as it doesnt follow our styling guide". Is this how opensource works?

( 7 comments | 6 points | on HN )
Re:Is this how opensource usually works? by madhouse on Sunday December 22, 2013 @06:31AM (#6950031)
A coding style is there for a reason, and Laravel even has a documentation that tells you in advance the coding style and gives you tips on how to submit a good pull request: https://github.com/laravel/framework/blob/master/CONTRIBUTIN...

This is how contributions work. Not just open source. At any sane company, you will have a common coding style, and your patches will not pass review, or be merged, if you do not follow. Same goes for open source.

Re:Is this how opensource usually works? by bjourne on Sunday December 22, 2013 @07:30AM (#6950131)
No, most projects are welcoming to outsiders especially if they bring in good improvements. From what I can see, an experienced emacs user could fix the formatting of your patch in about a minute so the "rules lawyering" seem completely unnecessary. It makes sense to expect well-formatted patches from veteran committers but most projects give the newbies a break.
Re:Is this how opensource usually works? by johnny22 on Sunday December 22, 2013 @05:03AM (#6949901)
yes. projects usually expect you to follow their coding style guides if they have one.
Re:Is this how opensource usually works? by xytop on Sunday December 22, 2013 @05:08AM (#6949911)
shouldnt they accept it as it is and then reformat code if they are unhappy with this? My opinion is that it is better to have a non-very-styled but working code than cool looking slow code with bugs.
Re:Is this how opensource usually works? by pedalpete on Sunday December 22, 2013 @06:11AM (#6950002)
The simple answer is no. If you think about the amount of work it would create for somebody to refactor your code vs. getting you to do it right in the first place.

Can you imagine what the source would look like if every developer used a different coding method? If there was no consistency in the API? It would be a nightmare to try to use if you couldn't consistently know that methods are camelcase or underscored, etc. etc.

Re:Is this how opensource usually works? by xwowsersx on Sunday December 22, 2013 @07:05AM (#6950093)
You have to realize that in order for the maintainers to effectively manage all of the contributions, they have to insist that, at a minimum, that the form of the code conforms to some basic guidelines. Otherwise, the code base quickly gets messy and confusing for people. You should view your goal as making the ability for them to merge in your stuff as painless/frictionless as possible.
Re:Is this how opensource usually works? by amboar on Sunday December 22, 2013 @06:07AM (#6949997)
Is it really so much effort to format your patch as required in comparison to doing the work to create the improvements you claim?