Skip to content

Commit 876462f

Browse files
fix: eliminate unreachable code in generated Java wire format unmarshal
The Java wire format unmarshal generator emitted fields after opaque bail-out returns, producing unreachable code that failed go vet (868 errors). Three root causes fixed: 1. parcelable_gen.go: break out of the field loop after emitting an opaque bail-out return instead of continuing to the next field. Track bail-out state to suppress the trailing return nil and only declare _err when reachable fields need it. 2. import_graph.go: add collectTypeNamesForCycleExpansion that includes JavaWireFormat delegate/typed_object GoType references. Used only for cycle type sub-package expansion (not import graph construction, which would cause import cycles). 3. codegen.go: use the new function in expandCycleTypes so that types referenced by JavaWireFormat struct fields are correctly generated in types sub-packages. Also removes 8 stale unreferenced types sub-package files that were no longer generated by the pipeline.
1 parent 8e98e6e commit 876462f

460 files changed

Lines changed: 107 additions & 8811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

android/app/admin/fullymanageddeviceprovisioningparams.go

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

android/app/admin/managedprofileprovisioningparams.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/admin/packagepolicy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/admin/wifissidpolicy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/ambientcontext/ambientcontexteventrequest.go

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

android/app/applicationexitinfo.go

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

android/app/assist/assiststructure.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/blob/blobhandle.go

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

android/app/blob/blobinfo.go

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

android/app/blob/leaseinfo.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)