Skip to content

Commit 48ae1d0

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: spec2cli excludes undiscoverable interfaces and validates against Go source
Three codegen fixes: 1. Sub-interfaces (returned by methods on other interfaces but not registered with ServiceManager) are excluded from CLI commands. Previously generated 1708 top-level commands; most were for interfaces that could never be discovered. Now only generates commands for interfaces with known service mappings or that are directly registered. 2. Unknown types (no Go struct/enum/interface exists) now return kindUnsupported instead of kindJSONFallback, preventing generation of code referencing undefined types like android.FileDescriptor or accessibilityservice.AccessibilityEvent. 3. Out-direction params are passed as zero values instead of requiring CLI flags, matching the Go proxy signatures that include out params as input parameters. Additional: validates generated commands against Go source to skip interfaces/methods whose proxy constructors or method signatures don't match the specs.
1 parent 95654ec commit 48ae1d0

3 files changed

Lines changed: 122604 additions & 523932 deletions

File tree

cmd/bindercli/commands_gen.go

Lines changed: 118213 additions & 517909 deletions
Original file line numberDiff line numberDiff line change

cmd/bindercli/registry_gen.go

Lines changed: 4088 additions & 5977 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/cmd/spec2cli/main.go

Lines changed: 303 additions & 46 deletions
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)