digitalmars.D.learn - Questions about Pull-Requests
- Benjamin Thaut (22/22) Dec 27 2012 Are there some guidelines for doing pull request?
- Jonathan M Davis (28/49) Dec 27 2012 If you're fixing a bug, you need to have something along the lines of "f...
- bearophile (7/8) Dec 27 2012 I didn't know it was updated. I like it! :-) My code already
- Jonathan M Davis (5/12) Dec 27 2012 There are probably a few more tweaks that need to be done to it (e.g. I'...
- Jacob Carlborg (8/11) Dec 27 2012 Then there's the standard Git guidelines. A commit message should
- Jacob Carlborg (8/13) Dec 27 2012 Not everyone is following this but it's good to try to follow it. The
- Jonathan M Davis (3/14) Dec 27 2012 It's my understanding that limit is 80, not 50.
Are there some guidelines for doing pull request? Something like: -Guidelines for commit messages -TODO list before doing a pull request (e.g. run tests, untabifiy, etc) -How to reproduce autotester issues -General coding guidlines (what to indent, what not, line breaks etc) Problems I'm currently having (with the latest git version): -Running druntime unittests when druntime is compiled with -debug -g will produce huge masses of console output -Running druntime unittests x86 windows will give me an assertion: core/time.d line 720 "seconds" -Running druntime unittest x64 windows compiled with -g insteand of -O -release gives me an assertion in gc.gcx line 3200 Why does the autotester not find the unittest failure on x86 windows? Does the autotester only run the tests with release binaries? Because it misses the assertion when compiled with x64 windows debug. Kind Regards Benjamin Thaut
Dec 27 2012
On Thursday, December 27, 2012 11:46:38 Benjamin Thaut wrote:Are there some guidelines for doing pull request? Something like: -Guidelines for commit messagesIf you're fixing a bug, you need to have something along the lines of "fix guidelines. Just be intelligent about them.-TODO list before doing a pull request (e.g. run tests, untabifiy, etc)Definitely run the unit tests on your local box first. It's kind of pointless to create a pull request that's guaranteed to fail the pull tester. Tabs aren't permitted, so make sure that you remove them if you've added them, but that's part of the general style guide.-How to reproduce autotester issuesBuild them on the same type of system that's failing? I'm not sure what else you'd be looking for here.-General coding guidlines (what to indent, what not, line breaks etc)This is mostly up-to-date now: http://dlang.org/dstyle.html Most of the guidelines relate to the API rather than code formatting. The main formatting ones are that spaces must be used (never tabs), braces should generally go on their own line (so Allman style, not K&R style), and lines have a soft limit of 80 characters and a hard limit of 120. Beyond that, formatting is pretty much just a question of trying to keep the style within a file consistent, but it varies from file to file.Problems I'm currently having (with the latest git version): -Running druntime unittests when druntime is compiled with -debug -g will produce huge masses of console output -Running druntime unittests x86 windows will give me an assertion: core/time.d line 720 "seconds" -Running druntime unittest x64 windows compiled with -g insteand of -O -release gives me an assertion in gc.gcx line 3200 Why does the autotester not find the unittest failure on x86 windows?That test depends on the the precision of your system clock, though I'm baffled as to how it could be failing with the TickDuration.ticksPerSec >= unitsPerSec check in there - especially on seconds. Something about your system is triggering something that I've never seen before, though I suspect that it's more likely to be an issue with the test than the code being tested. Anything involving TickDuration is very hard to test properly, because TickDuration's precision depends on the system clock's precision.Does the autotester only run the tests with release binaries? Because it misses the assertion when compiled with x64 windows debug.It runs them in both debug and release on the POSIX systems, but it may only run them in release on Windows. I vaguely remember something about that, but I'm not sure. - Jonathan M Davis
Dec 27 2012
Jonathan M Davis:This is mostly up-to-date now: http://dlang.org/dstyle.htmlI didn't know it was updated. I like it! :-) My code already follows all those rules (the only one I don't follow is "Braces should be on their own line", but that page it's only required for Phobos). Bye, bearophile
Dec 27 2012
On Thursday, December 27, 2012 12:15:19 bearophile wrote:Jonathan M Davis:There are probably a few more tweaks that need to be done to it (e.g. I'd love to axe the section on comments, since we don't really follow it, and I think that it's unnecessary), but it's mostly correct now. - Jonathan M DavisThis is mostly up-to-date now: http://dlang.org/dstyle.htmlI didn't know it was updated. I like it! :-) My code already follows all those rules (the only one I don't follow is "Braces should be on their own line", but that page it's only required for Phobos).
Dec 27 2012
On 2012-12-27 12:05, Jonathan M Davis wrote:If you're fixing a bug, you need to have something along the lines of "fix guidelines. Just be intelligent about them.Then there's the standard Git guidelines. A commit message should consist of a short description, 50 characters max, followed by, if necessary, a blank line then a full description of the commit. If it's enough to describe the commit in 50 characters that's perfectly fine. -- /Jacob Carlborg
Dec 27 2012
On 2012-12-27 16:15, Jacob Carlborg wrote:Then there's the standard Git guidelines. A commit message should consist of a short description, 50 characters max, followed by, if necessary, a blank line then a full description of the commit. If it's enough to describe the commit in 50 characters that's perfectly fine.Not everyone is following this but it's good to try to follow it. The reason for this is that various git related software uses the first line to display it in a user interface or similar. For example, all git commits are sent to an email list as well. The first line is used as the subject of the email. Hence it's good if it's short. -- /Jacob Carlborg
Dec 27 2012
On Thursday, December 27, 2012 16:15:25 Jacob Carlborg wrote:On 2012-12-27 12:05, Jonathan M Davis wrote:It's my understanding that limit is 80, not 50. - Jonathan M DavisIf you're fixing a bug, you need to have something along the lines of "fix guidelines. Just be intelligent about them.Then there's the standard Git guidelines. A commit message should consist of a short description, 50 characters max, followed by, if necessary, a blank line then a full description of the commit. If it's enough to describe the commit in 50 characters that's perfectly fine.
Dec 27 2012