-
Notifications
You must be signed in to change notification settings - Fork 177
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
Move schemas to schema
crate, rename Def
to RawDefV8
#1498
Conversation
b0093d4
to
084805e
Compare
084805e
to
55688bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
NOTE: The removal of names for sequence and such reordering break the system tables, so I think this should be marked.
Yeah, which is why I might not remove them after all, together with SQL compatibility. But this PR doesn't actually implement that, it just renames things to make future PRs easier to read. |
WAIT A MINUTE. We're on ABI version 8. Should this all be renamed |
Two suggestions:
I implemented these changes here: https://github.com/clockworklabs/SpacetimeDB/pull/1519/files Pros:
Cons:
Thoughts? |
Good question. I think if we need constant warnings then having the version in the structs is better, else if wanna clean refactorings in the module. |
05c123d
to
784d6a6
Compare
784d6a6
to
0621b3e
Compare
schema
crate, rename Def
to RawDefV0
schema
crate, rename Def
to RawDefV8
Yeah, we want warnings because these are now considered unvalidated user input types, and we want people to move to the new immutable + validated |
beb530c
to
f8d7689
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I think we're going to have to coordinate merging with with @gefjon's P0
f8d7689
to
10aaca4
Compare
Rebased over that, this should be good to go |
Description of Changes
This is in preparation for further schema rewrites, extracted from #1448, based on #1479. There are only name changes (well, and one bindings change due to the name changes).
I've chosen aggressive, ugly names for the existing
Def
types. This is because soon, these types will be considered unvalidated user input, which should not be used anywhere except at the module boundary, where they are immediately validated and converted to trusted types. I want these types to stick out in code to encourage migration away from them.API and ABI breaking changes
This is technically an API break, but the APIs involved are only used by macros, so 🤷
Expected complexity level and risk
0