| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Instead of leaving morph3 with a potentially confusing name, rename it
to `morphology` since it is now the only implementation of the
Morphology class.
|
|
|
|
|
|
| |
Rather than having a `get_commands` method to obtain missing commands
from the build system when they are needed, get the commands when
loading a morphology.
|
|
|
|
|
|
|
|
|
| |
This commit stops morphloader setting the `morph` field in chunk specs,
and also makes it set defaults for the prefix and build-mode fields. Not
setting the `morph` field is necessary as its presence in chunk specs is
used by `traverse_morphs` to mean that the morphology file is in the
definitions repository, not the chunk source repository. If we set a
default value here, we end up looking for files which do not exist.
|
|
|
|
|
|
|
|
| |
This prevents the description fields of morphologies being mangled.
This does not preserve the original formatting, so much as happen to
dump it in the same way we wrote it, but given we chose that form
because we think it looks the nicest, that's not a problem.
|
|
|
|
|
| |
There's a lot of them, it's too much of a pain to enumerate them all, so
it's convenient to provide a hierachy and catch the base exceptions.
|
| |
|
|
|
|
|
| |
This error message didn't report the cluster morph at fault.
We also fix a minor formatting issue.
|
|
|
|
|
| |
The names of deployments in cluster morphologies will need to be unique
in order for the deployment of selected systems to work.
|
| |
|
|
|
|
|
| |
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.
|