no-autodecode -- game plan
Steven Schveighoffer
schveiguy at gmail.com
Sun Aug 16 17:00:52 UTC 2020
Hi all,
TL;DR: I'm working on removing autodecoding from phobos. I have the
first real PR: https://github.com/dlang/phobos/pull/7595
So what is the plan here? I have added hooks for dlang's CI so that any
work we do on making phobos work without autodecoding does not go back
to being broken.
As expected, I'm finding bugs. But I have probably the most relevant
module passing Phobos unittests without autodecode: std.utf.
My plan is to pick a module or group of modules each week and spend some
time getting it to pass.
Help is appreciated! So what it the process, you ask? I hope this is
simple enough for everyone to follow:
1. set up your phobos dev environment (for now, I'm doing everything in
the posix makefile, so it cannot be done via Windows -- if you want to
fix this, please do!)
2. build phobos with no autodecoding:
NO_AUTODECODE=1 make -f posix.mak
3a. If you want to test a specific module:
NO_AUTODECODE=1 make -f posix.mak std/somemodule.test
3b. If you want to test all modules (and find one that breaks you can
work on):
NO_AUTODECODE=1 make -f posix.mak unittest
4. Fix it so it passes. It should pass both with and without
autodecoding. Try not to disable specific tests to get it to pass, we
want no-autodecode phobos to be usable! Instead, change them to either
not depend on autodecoding [1] (preferred) or add a static if that
tests both modes [2].
5. Add the modules that now pass to the posix.mak variable named
NO_AUTODECODE_MODULES. Once this is merged, any changes to that module
should have to pass without autodecoding.
The autodecode test is run in buildkite. PLEASE don't merge any PRs for
Phobos if this test is failing! instead, ping me.
If you want to work on this with me, please let's coordinate either on
slack or you can post here. We shouldn't be duplicating efforts (as much
as possible), and Phobos is pretty big.
-Steve
[1] examples of places where I changed the test to be autodecode agnostic:
https://github.com/dlang/phobos/pull/7595/files#diff-27410a0be96392a06647e61c73131b64L2401-R2402
https://github.com/dlang/phobos/pull/7595/files#diff-27410a0be96392a06647e61c73131b64L3375-R3379
[2] examples of places where I configured tests to test both autodecode
and non-autodecode:
https://github.com/dlang/phobos/pull/7595/files#diff-27410a0be96392a06647e61c73131b64L3619-R3639
More information about the Digitalmars-d
mailing list