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

WIP: Support vector syntax for references #1072

Closed
wants to merge 7 commits into from

Conversation

frenchy64
Copy link
Collaborator

@frenchy64 frenchy64 commented Jul 17, 2024

Adds full support for vector syntax for -reference?'s that don't point to IntoSchema. This removes a point of confusion about the differences between using a reference and a schema.

Properties are attached to the -pointer. Children are not allowed.

This changes how registries resolve IntoSchema's. The code used to recursively resolve registry entries such that {:string-alias :string, :string (-string-schema)} would resolve [:string-alias] to an instance of (-string-schema). Now it just returns a -pointer to :string-alias like the (non-vector) :string-alias syntax does.

I added a comment where future work could add support for user-defined "schema functions" that take and return schemas. I think we can reuse the same ideas as #1053 to make these hygienic and serializable.

@frenchy64 frenchy64 changed the title WIP: support vector syntax for references Support vector syntax for references Jul 17, 2024
@frenchy64 frenchy64 marked this pull request as ready for review July 17, 2024 17:55
@frenchy64 frenchy64 marked this pull request as draft July 17, 2024 19:25
@frenchy64 frenchy64 changed the title Support vector syntax for references WIP: Support vector syntax for references Jul 17, 2024
@frenchy64
Copy link
Collaborator Author

Moved to frenchy64#13

@frenchy64 frenchy64 closed this Jul 18, 2024
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.

1 participant