| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Iad95af65bd5c528d2e72f5b2ffa80a01152f50ff
|
|
|
|
| |
Change-Id: I891d1b13ed0581b293fe6b09b3cc73af8fd81d67
|
|
|
|
| |
Change-Id: Icd8858dbdbb45a636641f7c5b8ab540a8376acc7
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a stratum build-depends on itself, the build graph calculation
gets stuck in an infinite loop as it adds the same stratum to the
queue of morphologies to inspect over and over again.
This commit causes MorphologyLoader.validate_stratum to raise an
error if a stratum contains itself in it's build-depends, as
depending on itself makes no sense and will cause the above problem.
Change-Id: I76df5b7d63d010ae3b17f72bfa39b273e74279dd
|
|
|
|
| |
Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Instead of leaving morph3 with a potentially confusing name, rename it
to `morphology` since it is now the only implementation of the
Morphology class.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
|\
| |
| |
| | |
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.
|
|\
| |
| |
| | |
A tab fixed
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
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.
|