Skip to content

Conversation

Shabinder
Copy link
Contributor

Shall Fix #1163.

  • Ending Serial Name Description on encountering a recursive descriptor.
  • Have added a test class with a sample recursive class description.
  • Rather than using a placeholder, used class's simple descriptor name.

PS:

  • Allowing Edits by Maintainers if needed.

assertEquals(
expected = "SomeType<" +
"app.cash.zipline.internal.bridge.SomeRecursiveType<" +
"app.cash.zipline.internal.bridge.SomeRecursiveType?<app.cash.zipline.internal.bridge.SomeRecursiveType?>" +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it's necessary to include the second copy here. If we break before recursing it won't be included, and isn't it entirely redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JakeWharton you are correct, it does exit, in above:

  1. 1st serialName of Non-Nullable SomeRecursiveType.
  2. 1st serialName of Nullable SomeRecursiveType.
  3. 2nd Recurse serialName of Nullable SomeRecursiveType, hence exits with plain serialName of descriptor.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right my question was if the second copy is actually necessary or redundant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AhUnderstood what you mean,
Yes we could just return empty string once we hit recursion instead of repeating serialName, shouldn't matter.

Co-authored-by: Jake Wharton <github@jakewharton.com>
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.

Stack Overflow after 1.2.0, because of shared commit.
2 participants