-
Improvement
-
Resolution: Won't Do
-
Medium
-
None
-
None
The two user-facing contexts expose namespace access, each of which requires resolving a NamespaceAccess – which ends up going to BuildGlobalContext.
This is currently dictated by legacy class hierarchy and APIs, but we should be able to disconnect these three and passing around a NamespaceCtx:
interface NamespaceCtx {
<K, V> @Nullable Map<K, V> namespace(CommonStmtCtx stmt, ParserNamespace<K, V> namespace);
<K, V> @Nullable V namespaceItem(CommonStmtCtx stmt, ParserNamespace<K, V> namespace, K key);
<K, V> @Nullable Map<K, V> localNamespacePortion(CommonStmtCtx stmt, ParserNamespace<K, V> namespace);
}
to all methods which are allowed to access namespaces.
The reactor would implement this through BuildGlobalContext, which would mean that AbstractStorageNode would not need accessNamespace(). There are two wrinkles:
- the need to cast stmt to ReactorStmtCtx – which is essentially fine
- the amount of API changes – which entails a lot of work
- is blocked by
-
YANGTOOLS-1497 Improve NamespaceBehaviour/NamespaceStorageNode interactions
- Resolved