| 1 |
So you'd like to help? Cool. |
| 2 |
|
| 3 |
Bug tracking is via CPAN RT at |
| 4 |
https://rt.cpan.org/Dist/Display.html?Name=Devel-Size |
| 5 |
|
| 6 |
If you want to send a patch, attaching it to an RT ticket is useful. Don't worry |
| 7 |
if it's not perfect - it's much easier to review an adapt a patch that than to |
| 8 |
start from scratch. But patching this module is often hard - there are easier |
| 9 |
ways to help: |
| 10 |
|
| 11 |
Bug reports also useful. Please include the full `perl -V` output to give not |
| 12 |
just version and platform, but also the specific build options. |
| 13 |
|
| 14 |
The module is purposely relying on implementation details that may change |
| 15 |
underneath it, and hence is often sensitive to obscure details of the build |
| 16 |
choices. It has to make a lot of (naughty) assumptions about the core internals, |
| 17 |
so regressions happen when the core changes and the module doesn't keep up. |
| 18 |
This is the most frequent cause of failing tests. In this case, it's helpful to |
| 19 |
know what particular commit in the core caused it to break. If you have a |
| 20 |
suitably powerful machine, can run this automatically. |
| 21 |
|
| 22 |
If you don't have a copy yet: |
| 23 |
|
| 24 |
git clone https://perl5.git.perl.org/perl.git |
| 25 |
|
| 26 |
(currently about 160M of download) |
| 27 |
|
| 28 |
then from the inside the checkout run a bisect. For example, if on your system |
| 29 |
the regression tests for Devel::Size are now failing on the current development |
| 30 |
version of perl but the pass with an earlier stable release version, you can run this to |
| 31 |
automatically find which commit broke the tests: |
| 32 |
|
| 33 |
./Porting/bisect.pl --module=Devel::Size |
| 34 |
|
| 35 |
See `./Porting/bisect.pl --help` for all the options; --with-module=Devel::Size |
| 36 |
might also be useful if you have a specific test case. |
| 37 |
|
| 38 |
Beware - even on a modern machine this might take a couple of hours. If you |
| 39 |
have a laptop plug it in, and best to let it run overnight or when the machine |
| 40 |
would otherwise be idle. |
| 41 |
|
| 42 |
If you aren't able to do this, don't worry, but if you are, awesome - sometimes |
| 43 |
from this it's immediately obvious what the likely cause is, which is a great |
| 44 |
morale boost for starting to figure out a fix. |
| 45 |
|
| 46 |
If you *are* able to do this, and want to actively help, go look to see if there |
| 47 |
are other open tickets without any indication of which core commit might have |
| 48 |
broken it, and see if you can replicate the problem locally, and if so run a |
| 49 |
bisect to try to find the cause. |
| 50 |
|
| 51 |
Two tools that can be very useful for diagnosing problems |
| 52 |
|
| 53 |
1) valgrind - a tool you can usually install using your OS package manager |
| 54 |
2) Address Sanitizer (ASAN) - options for the C compilers gcc and clang |
| 55 |
|
| 56 |
valgrind can be used to run your existing built perl binary and Devel::Size and |
| 57 |
report on illegal memory accesses that would otherwise would silently return |
| 58 |
garbage data. It's great for a quick test of an existing problematic test case, |
| 59 |
but slows execution down massively, and is not (yet) that useful for automatic |
| 60 |
bisecting. |
| 61 |
|
| 62 |
ASAN requires you to (re)build perl from source with it, which in turn requires |
| 63 |
invoking perl's ./Configure with non-default options, so it's a bit more |
| 64 |
involved. However, the slowdown is not as severe as valgrind, and it is possible |
| 65 |
to use it for automated bisecting. |
| 66 |
|