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

fix handling of external refs targeting member shapes #189

Merged
merged 5 commits into from
Sep 15, 2023

Conversation

lewisjkl
Copy link
Collaborator

Fixes case where an external reference is pointing to a member shape targeting a primitive type.

@lewisjkl
Copy link
Collaborator Author

lewisjkl commented Sep 12, 2023

Going to give this another think tomorrow to make sure I'm not missing a simpler/better way to approach this.

Update: I think we go with this for the time being and can revisit later if someone comes up with a nicer approach.

@lewisjkl lewisjkl marked this pull request as ready for review September 13, 2023 17:08
@lewisjkl lewisjkl requested a review from daddykotex September 13, 2023 17:08
import cats.data.Chain
import scala.annotation.tailrec

/** This transformer is for the specific case where an external reference
Copy link
Contributor

Choose a reason for hiding this comment

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

as I recall from our discussion, this only happens if B$b is a primitive right?
can we state that in the doc or we don't want to because it may happen in other instances and we're not sure

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I will add it to the doc. It is that way since we match on the NewType on line 95 below and at this point in the postprocessing, all primitives are wrapped in newtypes

@lewisjkl lewisjkl merged commit 283ef29 into main Sep 15, 2023
@lewisjkl lewisjkl deleted the external-member-refs branch September 15, 2023 17:56
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.

2 participants