Monorepo?
Walter Bright
newshound2 at digitalmars.com
Mon Feb 6 18:36:56 UTC 2023
On 2/6/2023 8:48 AM, Mathias LANG wrote:
> On Monday, 6 February 2023 at 10:22:32 UTC, Atila Neves wrote:
>> Now that dmd/druntime is in one repo, is there a good reason to not include
>> Phobos?
>
> Because it will inevitably lead to circular dependencies, something Walter is
> already complaining about.
More specifically, I complained about the order in which things were built and
tested.
There is a test suite designed to test the compiler. There are many hundreds of
these tests. Each is standalone, only a few lines long. I.e. they are already
reduced and isolated. (The source of most of these were bugs that were fixed.)
When something in that test suite fails, one can usually go directly to the problem.
But what happens with the way the test suite is run is:
1. the compiler gets built
2. then the compiler is used to compile druntime. Boom, the compiler crashes.
Now you've got hours of work to reduce the problem.
3. or the compiler is used to build checkwhitespace. Boom, the compiler crashes,
or checkwhitespace crashes. Hours of work ahead.
4. or the compiler is used to bootstrap itself. Boom, it creates a compiler that
crashes, or the created compiler compiles code badly. Hours of work ahead.
5. or the compiler is used to build build.d. build itself then crashes. Hours of
work ahead.
6. or the compiler is used to build Phobos. It crashes building Phobos, or the
Phobos unittests fail. Hours of work ahead.
--- OR ---
the freshly built compiler is used to run the compiler test suite. test1234.d
fails. A few minutes of work identifying what went wrong, because you've only
got 6 lines of code to look at rather than 100,000 lines.
2,3,4,5,6 have all routinely happened.
At least (mostly) the compiler test suite does not depend on a functioning
Phobos. Myself (and others) have removed nearly all of those dependencies.
Another advantage of running the compiler test suite first is it is relatively
small and runs fast. Hence, you get quick turnaround.
More information about the Digitalmars-d
mailing list