| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
There's no longer any need to log the exception separately,
it will be logged with the MorphologySyntaxError
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This now means that the system morphology is not altered when chunks are
altered, so some tests had to change.
Since this uses the python warnings API, these warnings can be ignored
by running
python -W ignore:"stratum morphology" \
-W ignore:"system morphology" \
"$(which morph)" ...`
or turned into errors with
python -W error:"stratum morphology" \
-W error:"system morphology" \
"$(which morph)" ...`
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think that it's confusing for both strata and chunk morphologies to
have a 'chunks' field, with the former listing sources and the latter
listing rules for splitting this source into artifacts.
The design for splitting strata has roughly the same idea, but operating
on chunk artifact names, rather than file names, so a name that can be
used for both was chosen.
Splits and artifacts weren't satisfactory names, so they're now called
'products'.
It was decided to break backwards compatibility of chunk morphologies
being able to specify 'chunks', since the format has changed, so extra
code would be required to translate the format, and the only users of
the 'chunks' field was the test suite, since there was no way to select
from the system, which chunk artifacts were included.
|
|
|
|
| |
It saves some boilerplate.
|
|
|
|
|
|
|
|
|
|
| |
It doesn't currently make sense to build a system which contains no
strata. We may later add other fields, such as initramfs to contribute
to the system's artifact, but until then it's another bug to trip over.
This uses collections.Sequence for checking the type of the systems entry
in the morphology as a style choice, though it allows more flexibility
if the types in the parsed morphology change.
|
|
|
|
|
|
|
|
| |
This was omittted from the MorphologyLoader due to cluster morphologies
being added at about the same time.
This bug escaped detection since the MorphologyLoader was not required
to deploy. It soon will be.
|
|
|
|
|
| |
Dedicated exceptions allow more fine-grained exception catching and can
have extra data.
|
|\
| |
| |
| |
| | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Richard Maw
|
| | |
|
|\ \
| |/
|/|
| | |
Changed the error (exception) to list all obsolete fields.
|
| |
| |
| |
| | |
ObsoleteFieldError
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original contents of the morphology is not generally trackable,
comments are lost for example, and it's simpler to output a canonical
format than attempt to preserve everything of the original.
However, we don't want to clutter the output with fields that have
been filled out to be the defaults, so provide a method to remove
fields that are the same as their default.
This also removes a check in set_defaults that it is a valid kind,
since it explicitly declares it assumes the morphology is valid.
|
|
|
|
|
|
|
| |
Although clusters morphologies are still loaded using
the old code, `checkout` in the new branch-and-merge
plugin tries to load and validate the morphology using
morphloader.
|
| |
|
|
|
|
| |
Suggested by Richard Maw
|
|
|
|
| |
Suggested by Richard Maw
|
|
|
|
|
|
|
| |
The old code, which MorphologyLoader will replace, allows build-mode
test as well as bootstrap, so the new code needs to do that too.
Suggested by Richard Maw.
|
|
|
|
|
|
|
|
| |
We don't have a real name for the dict that tells us what chunk
(or stratum) to use in a stratum (or system). The code was sometimes
using spec, and sometimes info. It now uses spec always.
Suggested by Richard Maw
|
|
|
|
|
|
|
| |
The new name is more descriptive, since it turns out that the
method doesn't just parse strings, but also open file handles.
Suggested by Richard Maw.
|
|
|
|
|
|
|
| |
It turns out the yaml module can handle strings directly, and does
not need explicit file handles.
Suggested by Richard Maw.
|
|
The old code is somewhat weird. The new code is meant to be cleaner and more
straightforward to understand and to use. For example, the old code has setting
of defaults in both the Morphology and MorphologyFactory classes. The new code
has a minimally simple Morphology class, and has all the logic to validate and
set defaults in the MorphologyLoader class. Further, the new code makes it
possible to load an invalid morphology, which will be useful later.
|