Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Swift APIView] Improve TypeModel implementation #3091

Closed
12 tasks done
tjprescott opened this issue Apr 6, 2022 · 0 comments · Fixed by #3069
Closed
12 tasks done

[Swift APIView] Improve TypeModel implementation #3091

tjprescott opened this issue Apr 6, 2022 · 0 comments · Fixed by #3069
Assignees
Labels
APIView Priority 1 APIView bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Swift

Comments

@tjprescott
Copy link
Member

tjprescott commented Apr 6, 2022

Currently this is a huge, ugly, messy chunk of code. A cleaner implementation would be to have separate structs for each kind of supported Type annotation. From the Swift grammar docs:

  • function-type
  • array-type
  • dictionary-type
  • type-identifier
  • tuple-type
  • optional-type
  • implicitly-unwrapped-optional-type
  • protocol-composition-type
  • opaque-type
  • metatype-type
  • any-type
  • self-type

At least two types display with the current type model in a buggy way:

  • tuple-identifier
  • protocol-composition-type
@tjprescott tjprescott added bug This issue requires a change to an existing behavior in the product in order to be resolved. APIView Client This issue points to a problem in the data-plane of the library. APIView Priority 1 Swift labels Apr 6, 2022
@tjprescott tjprescott self-assigned this Apr 6, 2022
@tjprescott tjprescott changed the title [Swift APIView] Improve code for TypeModel [Swift APIView] Improve TypeModel implementation Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIView Priority 1 APIView bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Swift
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant