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
{{ message }}
Repository navigation
Generated builder for a nested local flow cannot build its children (root segment duplicated) #19
A generated node builder for a local flow nested inside another flow cannot build its own children. The child target resolves with the flow's root segment twice, so the builder's when never matches and it throws.
Navigate app -> settings -> general. Building general fails:
java.lang.IllegalStateException: illegal path build requested for "settings" node: settings.general
at ru.kode.way.dslparity.SettingsNodeBuilder.build(SettingsNodeBuilder.kt:34)
at ru.kode.way.dslparity.AppNodeBuilder.build(AppNodeBuilder.kt:58)
at ru.kode.way.TransitionNodeBuilder.build(NavigationService.kt:1110)
at ru.kode.way.NavigationService.synchronizeNodes(NavigationService.kt:835)
Cause
In the generated SettingsNodeBuilder.build, the root path is settings. Its child branch compares against targetOrError(Segment("general@..."), rootSegmentAlias), which goes through schema.target(...) and returns the full target from the schema root's point of view. Under the settings alias it resolves to settings.settings.general, but the requested path is settings.general, so no branch matches and else -> error(...) throws.
The generated targets for nodes inside a local (non-schema) flow seem to carry the flow's own segment, and the alias then adds it a second time. Builders for included schemas (type = schema) are not affected.
Workaround
The DSL parity test in #18 builds this one flow's NodeBuilder by hand on the generated side.
Activity
Fix #19-#22, NodeHost autoStart, release 0.13.0 (#23)