Skip to content

Report illegal codegen parameter types at declaration - #2129

Open
arpitagarwal1301 wants to merge 1 commit into
square:masterfrom
arpitagarwal1301:fix/1084-improve-error-messaging-on
Open

Report illegal codegen parameter types at declaration#2129
arpitagarwal1301 wants to merge 1 commit into
square:masterfrom
arpitagarwal1301:fix/1084-improve-error-messaging-on

Conversation

@arpitagarwal1301

Copy link
Copy Markdown

Fixes #1084

Summary

  • report illegal direct Unit, Nothing, and Void constructor parameters on the parameter element
  • unwrap aliases and ignore nullability only for validation while preserving the original generated type
  • avoid catch-all stack traces and misleading missing-constructor diagnostics

Validation

  • focused KSP compile-testing regressions, including chained aliases and List<Unit>
  • ./gradlew spotlessCheck :moshi-kotlin-codegen:check
  • ./gradlew build check -PkotlinTestMode=KSP
  • ./gradlew build check -PkotlinTestMode=REFLECT
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error messaging on Unit/Nothing/Void types in code gen

1 participant