-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
area: routingIssues related to routing.Issues related to routing.uxIssues related to the user experience working with Relic.Issues related to the user experience working with Relic.
Description
Context
When a trie is attached using attachAndConsume, the trie is consumed and subsequent modifications to it are not reflected in the parent trie. Currently, adding routes to a consumed trie after attachment is a silent no-op.
Enhancement Request
Consider throwing an error when attempting to add routes to a consumed trie to make it apparent that the operation has no effect.
References
- PR: feat: Add optional consume flag to attach #309
- Comment: feat: Add optional consume flag to attach #309 (comment)
- Requested by: @SandPod
Related Code
trieB.add(NormalizedPath('/'), 1);
trieA.attachAndConsume(NormalizedPath('/api'), trieB);
// Add a new route to trieB after attachment
trieB.add(NormalizedPath('/new'), 2); // This is currently a no-opThe suggestion is to throw an error at this point to make the no-op behavior explicit.
Metadata
Metadata
Assignees
Labels
area: routingIssues related to routing.Issues related to routing.uxIssues related to the user experience working with Relic.Issues related to the user experience working with Relic.
Type
Projects
Status
Backlog 🗂️