[adr] Java CDDL generator proposal#17692
Conversation
PR Summary by QodoAdd ADR for generating Java WebDriver BiDi bindings from CDDL Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Tickets:
🎫 Instance ChroneDriver Error: ConnectFailure 🎫 2.48 doesn't trigger javascript in link's href on click()✅ Compliance rules (platform):
11 rules 1. Unnumbered ADR title
|
|
I think the manifest is a bad idea and easily avoidable. We don't need to store orchestration logic in the generated module classes. Keep the generated low-level in its own namespace and let a hand-written, checked-in coordination layer import it rather than be injected into it. If the generated code lands in a new namespace, we don't need to ensure parity with existing code. The low level things should all be private API, and any high level implementations can move to the new implementation. The CDDL spec should be the oracle, not the existing implementation. |
|
The Type Generation section covers the common cases well (enums from string-literal unions, POJOs from named groups, param builders), but a handful of CDDL shapes don't fit those patterns and tend to fail silently and need to be accounted for.
|
|
Actually I think this belongs in the bidi-model generation, let me whip up a PR. |
|
The PR that addresses my previous comments is here: #17700 |
titusfortner
left a comment
There was a problem hiding this comment.
Thanks for proposing this with all the details.
Per our ADR guidance, ADRs aren't meant to cover "single-binding internals," so I've taken what I read as the purpose behind this, reframed it toward what I think is the right approach, and opened an alternate ADR: #17701.
I've described my substantive disagreements there, but a lot of it hinges on how we decide #17670.
I think we should:
diemol
left a comment
There was a problem hiding this comment.
This ADR covers more than one concern. I think it should focus either on the decision to generate Java BiDi bindings from CDDL or on coordinating with @titusfortner on #17700 to move that shared model forward. I prefer the latter.
The orchestration layer question (where coordination code lives relative to generated definitions) is what #17701 is trying to settle at the cross-binding level. For event observation and the Subscription cancellation API, which belong in #17671, since it's proposing those primitives cross-binding. And for network handler behavior specifically, that's the scope of #17685.
🔗 Related Issues
💥 What does this PR do?
Adds ADR recording the decision to generate Java WebDriver BiDi bindings from the CDDL spec.
🔧 Implementation Notes
The three cross-binding decisions recorded here : factory construction, subscription cancellation handles, and unified modules. These have user-visible consequences that needed to be settled before implementation begins. Python and JavaScript already generate from the same CDDL source. This record closes the loop on the Java binding's approach and captures the rejected alternatives (static utility pattern, raw listener IDs, split command/event classes) so they don't resurface in review.
Full generator design proposal: https://gist.github.com/pujagani/0a62197fd7c9b6d120e3a658fd7381d0
🤖 AI assistance
💡 Additional Considerations
The @beta annotation on all existing hand-written BiDi classes ships in the next release, giving users one release of warning before the cutover PR removes them.
🔄 Types of changes