... | ... | @@ -69,16 +69,16 @@ But we *really appreciate* effort to produce a repro case if you can: |
|
|
|
|
|
- **As small as possible**. It costs you real work to "boil down" the bug from a big program to a small one, but the plain truth is that the easier the bug is to reproduce, and the smaller the test program (= smaller debug output), the less time it costs us to fix it. Also, as you are familiar with the code, it is generally easier for you to boil it down than for us to. Please note that instances of certain classes, whether hand-written or derived, can produce a substantial amount of code. In particular, if you can demonstrate the bug without writing or deriving instances of `Show`, `Read`, `Generic`, or `Data`, that is generally preferable. To demonstrate evaluation, prefer `deepseq` to `show`, and write any necessary `NFData` instances by hand.
|
|
|
|
|
|
- **Zero dependencies**. If we have to run `cabal install`, we can't put it in the testsuite *as is*. Dependencies also make it substantially harder to determine exactly where a bug was introduced, as it may be difficult or impossible to compile those dependencies at an arbitrary GHC commit. If you don't have time to eliminate all dependencies, or if you're unable to do so, you **must include version numbers or git commit hashes for each remaining dependency**. Failing to do this makes it *extremely* difficult to reproduce the problem; we will have to try to guess likely version numbers or commits based on ticket entry dates, which is both painful and unreliable, especially since library maintainers will often add workarounds for the very issues reported here.
|
|
|
- **Minimise dependencies**. If we have to run `cabal install`, we can't put it in the testsuite *as is*. Dependencies also make it substantially harder to determine exactly where a bug was introduced, as it may be difficult or impossible to compile those dependencies at an arbitrary GHC commit.
|
|
|
|
|
|
One way to cut down programs is to replace library functions with definitions like
|
|
|
One way to cut down programs and minimise dependencies is to replace library functions with definitions like
|
|
|
```wiki
|
|
|
displayWidget :: This -> IO That
|
|
|
displayWidget = undefined
|
|
|
```
|
|
|
and thereby avoid the necessity for the supporting library.
|
|
|
|
|
|
|
|
|
If you don't have time to eliminate all dependencies, or if you're unable to do so, you **must include version numbers or git commit hashes for each remaining dependency**. Failing to do this makes it *extremely* difficult to reproduce the problem; we will have to try to guess likely version numbers or commits based on ticket entry dates, which is both painful and unreliable, especially since library maintainers will often add workarounds for the very issues reported here.
|
|
|
|
|
|
|
|
|
If you are a Hero and track down the problem in the compilation-system sources, please [send us patches](working-conventions/fixing-bugs). |
|
|
\ No newline at end of file |