Difference between revisions of "Get involved"

From D Wiki
Jump to: navigation, search
(Fix Bugzilla issues: add link to pre-filtered bugzilla issues)
(See also: add links to contribution guides)
Line 143: Line 143:
 
== See also ==
 
== See also ==
  
 +
* [[Starting as a Contributor]]
 +
* [[Contributing to Phobos]]
 
* [[Bugzilla]]
 
* [[Bugzilla]]
 
* [[Pull Requests]], [[Review process]], [http://dlang.org/dstyle.html Phobos style guidelines]
 
* [[Pull Requests]], [[Review process]], [http://dlang.org/dstyle.html Phobos style guidelines]

Revision as of 15:11, 28 February 2017

File a bug report

The simplest way to participate is to file bug reports at the bug tracker.

If you find any problems with the D language, please file a bug report. Problems that are not filed will not get fixed, because the developers wouldn't know the problem existed. If you're not sure if something is a bug or by design, please ask in the forums (see below).

Ideally, bug reports should be accompanied by a small, self-contained example which demonstrates the problem, and makes it easy to reproduce it. If you find it difficult to manually extract a small example from your source code, DustMite can help with automatically extracting one. See the project wiki for more information.

If a piece of code worked in an older version of a compiler but no longer works in a newer version, please file a regression (by setting the "Severity" field to "Regression"). Regression bugs are examined before all others. You can use Digger to find the pull request that introduced the change which broke your code. DustMite can also be helpful in creating a minimal example.

Note that compiler internal errors (crashes, assertion failures, etc.) should always be filed. No matter how wrong your input is, the compiler should give an appropriate error message and abort compilation; it should never crash. Such crashes are always bugs.

Discuss in the forums

You can also join in the discussion at the D forums, which can be accessed via the web interface, the mailing list interface, or the NNTP server.

The main D forum is for general discussion on the D language, feature requests and discussions, etc.. Newcomers should start with the D.learn forum, which is intended for learners to ask more basic questions about programming in D.

Alpha-test the development version of D

If you're feeling adventurous, or crave the bleeding-edge features of D, you may want to learn how to build git master.

Contribute to the source code

Fix Bugzilla issues

The source code for the D website, compiler, runtime library, and Phobos (the standard library), are all available on GitHub. Contributions to the source code are done via pull requests. Please note that contributions to DMD source code will only be accepted if the author agrees to have the copyright of the code assigned to the D Language Foundation.

To find something to work on, you can search the bug list for issues that you can help fix, or on one that has been voted for a lot or preapproved.

There is a pre-filtered list of trivial issues which might be good starting points for beginners. Help to maintain this pre-filtered list of trivial issues is welcome as well.

Simple tasks for Phobos

The high-level vision document lists many projects that one can start to change the status quo. However, as most of them might require a lot of time or expertise, here are a couple of ideas from the high-level vision that have been semi-automated and could be a good start to get involved:

  • Improve code coverage CodeCov report
  • Make sure every function in Phobos has an example script,example
  • Make sure every function in Phobos has Params: and Returns: script
  • Review `@safe` usage in Phobos (or `@system` -> `@safe`) guide, example
  • Enable more Dscanner plugins/automation for Phobos config

Contribute to the documentation and dlang.org

To contribute to the documentation, start by reading How to Fork and Build dlang.org. Additional information on improving the documentation can be found in this thread started by Walter Bright.

Review pull requests

The sheer amount of code being written for the D compiler, standard library and related project is often too great for the core developers to keep up. Even if you're not a "hardcore" D developer you can help lessen this load by reviewing the changes in pull requests at GitHub for DMD, Phobos, DRuntime and the D website.

Various "easy" things to look for:

  • Missing or hard to understand comments
  • Unintuitive documentation
  • Unchecked edge cases in the code (missing assert, enforce, template constraints)
  • Inconsistencies with the D style
  • API inconvenient for use cases the author didn't think of
  • Missing/inadequate unittests
  • Unittests should be annotated @safe. If @safe is not possible, it shall be @system.
  • Poor code coverage (install the CodeCov browser extension or check `dmd -cov -unittest -main std/filename.d`)
  • More/better code examples in documentation. Look at answers in D.learn and stack overflow for ideas.
  • Missing overflow checks when calculating storage sizes

Please avoid:

  • Drifting off topic, i.e. anything other than the PR being reviewed.

To run the unittests of a single file on posix:

make -f posix.mak DMD=../dmd/src/dmd std/*.test

Adding "-cov" to the "%.test" target inside posix.mak will generate a coverage analysis.

Also, it is often helpful to review old pull requests (e.g. sort by least recently updated on GitHub). Commenting on an old pull request that seems OK but was for some reason forgotten may bring some attention to it. If you think a pull request is OK to be merged, write "LGTM" (looks good to merge) in your comment.

If a pull you're interested in has been languishing in the queue for a long time with no attention, commenting "ping" may help prod things along. Especially if the author needs to rebase the pull due to a merge conflict, autotester failure, or other such maintenance problem.

Citing Andrei Alexandrescu:

"If you see [Pull request] you care about, review it even if you don't have rights yet. A simple message such as "I reviewed this and LGTM, any holdup?" would be sufficient to attract attention."

Google Summer of Code ideas

Some of the past ideas may still be interesting:

Other D-related projects

How to better promote your own D projects

I hate the movie "Field of Dreams" where they push the idiotic idea of "Build it and they will come." No, they won't. There's a blizzard of stuff competing for their attention out there, why should they invest the time looking at your stuff? You need to tell them why!

Here's the frustrating typical pattern I've seen here for years:

  1. spend hundreds if not thousands of hours developing something really cool
  2. spend 2 minutes posting a link to the repository on D.announce
  3. someone posts it to reddit. Ignore it
  4. get frustrated that nobody looks at it
  5. get bitter and quit

Here's the pattern that works a lot better:

  1. spend hundreds if not thousands of hours developing something really cool
  2. spend 10 minutes writing the announcement to D.announce. Be sure to include:
    who, what, where, when, why, and how
  3. someone posts it to reddit
  4. post the who, what, where, when, why and how on reddit AS SOON AS POSSIBLE after the reddit link appears. Stuff on reddit has a VERY SHORT shelf life. If it doesn't get action within a couple hours, it fades into oblivion. Identify yourself as the author, say AMA. The first one to post a comment tends to spark and set the tone for the discussion.
  5. check back on reddit once an hour or so for the next day, answer questions
  6. *****
  7. profit!

Walter Bright

Contribute to this wiki

  • D as a second language sections should be completed
  • add more examples of how to shift idiom to speak fluent D
  • flesh out the Python page
  • review empty sections
  • update C and C++ transition guides

One note about Walter's older C/C++ transition articles. They have good information on transition technicalities (e.g. "how do I do this thing in D that I used to do in C++?") but not a lot about the changes in coding style - making object copying not arbitrarily expensive, choosing struct vs. class, preferring pipelines and lazy to eager computation, etc. From what I see some folks come from C++, write their first D program in a stilted C++ idiom, and are left with the impression that the work is not worth the trouble.

Andrei

See also