Description
In the CSN (Core Schema Notation) format produced by CDS compiler v6, annotation expressions that were propagated to derived entities could carry an = property on expression objects, used to represent the original annotation value before propagation. CDS compiler v7 (CDS 10) removes the = property from propagated annotation expressions. Custom tooling — annotation processors, code generators, or build scripts — that access annotationExpr["="] on CSN annotation expression objects will receive undefined and must be updated to read the annotation value through the standard CSN expression structure.
How to Check
- [ ] Search build scripts, code generators, and CDS plugins for
["="]or['=']property access on objects derived from compiled CSN annotation data. - [ ] Inspect any code that iterates over CSN element or entity annotations and accesses expression properties.
- [ ] Check custom linting rules, documentation generators, or migration tools that consume raw CSN annotation expression nodes.
Migration Steps
Remove access to the
=property on annotation expression objects and use the standard CSN expression structure instead:diffconst csn = await cds.compile.to.csn('srv/'); const annotation = csn.definitions['Books']['@MyAnnotation']; - const value = annotation['=']; + // Read the annotation value directly — the = indirection is removed + const value = annotation;For annotation expressions that previously used
=as an indirection to the actual value, update the traversal to work with the direct value structure:difffunction getAnnotationValue(expr) { - return expr['='] ?? expr; + return expr; }Run the CSN-consuming tool against a CDS 10-compiled CSN and verify that annotation values are read correctly without the
=property.
Notes
The = property was an implementation detail of how the v6 compiler represented propagated annotation values — it was never part of the stable CSN specification. Code relying on it was already fragile. The standard way to read annotation values from CSN is to access the annotation key directly on the definition object, without any = indirection.