You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#80.
Update the schema to support a dictionary of "versions" for traits and
specifications, where each version contains a full trait/specification
definition.
Add a "deprecated" tag to the schema, allowing traits and specifications
to be flagged as due for complete removal (i.e. all versions).
Use string keys for the version, rather than integer keys, to provide
maximum scope for future extension (e.g. tagged, semver). Note: this
decision was not called out in the original design.
Add a `.v1` suffix to trait IDs and an `_v1` suffix to trait and
specification class names (where `1` is the version string).
Do not add a version suffix to the ID for the first version of a trait,
to maintain backward compatibility.
Add trait classes that match the previous scheme, i.e. with no `_v1`
suffix, which alias the first version of a trait, to maintain backward
compatibility. Use inheritance to ensure maximum compatibility, rather
than duplicating the class.
Similarly to traits, add unversioned Specification view classes for
backward compatibility.
Non-versioned view classes are only for backward compatibility - going
forward, hosts/managers should be explicit and use the version-suffixed
classes.
So mark non-versioned view classes as deprecated in their docstrings.
For Python, add a `DeprecationWarning` using the `warnings` module when
an unversioned view class is first constructed. Use the class name in
the warning text, so a separate warning will be generated for each
non-migrated class.
For C++, add `[[deprecated]]` annotation to non-versioned view classes.
Add deprecation docstrings and warnings for traits and specifications
flagged with `deprecated: true`. Flag warnings at runtime in Python
using the `warnings` module and C++ at compile time using the
`[[deprecated]]` annotation.
Update log output from command-line script to add version numbers.
Since we're now using the `to_python_*_name` filters multiple times for
the same input (in particular, class names), any names modified to be
valid Python identifiers duplicate the same "Conforming" warning logs
several times. So de-duplicate by keeping a cache of warnings that have
already been logged.
Add version specifiers to `TraitDeclaration`, `TraitReference` and
`SpecificationDeclaration` for use in constructing IDs and class names.
Add a CTest target for testing C++ deprecation warnings. Suppress at the
compiler warning level, other than for the explicit deprecation warning
test. Unfortunately, testing multiple raw string matches in build output
via CTest is rather involved, but can be made to work.
Signed-off-by: David Feltell <david.feltell@foundry.com>
0 commit comments