-
Notifications
You must be signed in to change notification settings - Fork 179
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
Moving object defs to SATS #460
Conversation
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.
I suppose the motivation for moving all those types into sats
is some cyclic dependency issue, but I'm not able to see where it arises.
Arguably, it's quite strange to expand the scope of sats
in this way. Maybe there is a better way to organize the crates, or maybe the solution is not so obvious. I would at least request to explain clearly in the PR description what the problem is and how it is solved. This way, git blame
should give some context.
I'd like @Centril to weigh in as well if we should try to find a nicer layout now, or merge this and revisit later.
Yes. I updated the pr with a comment. I think trying to put it in a different place is not the best use of energy now, this set of PR is already late, and we have also an incoming refactor for the datastore and in special query engine where we could hit deps problems (I already getting this almost each time I rebase). When we have the functionality in set we could revisit how to reduce/change the location of things, especially when we have a firm grasp on these incoming refactors. In concrete, the query engine will need more metadata about the DB, and also the |
c2e8b02
to
3162e3a
Compare
ProductValues can be more than rows and can be nested
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.
Looks good; I made some minor changes during my review:
ColumnIndexAttribute
was moved intospacetimedb_primitives
which cratesbindings-*
can use so now we don't need#[path]
hackery.ProductValue
takesusize
again in the variousfield
methods. I reverted your change here because product values need not be a row and so their fields need not be columns. Perhaps with more neutral language we could use a newtype here in the future.- Some minor refactoring opportunities I saw in your diff.
We'd discussed the spelling of |
Ah crap; I thought I had that part removed but must have been a bad rebase on that bit. |
Removed in #559. |
Description of Changes
Split the move of DB definitions from #439 in a smaller change set.
This is part of the larger #267. The move into SATS is because cyclic dependencies between
db <-> sats <-> vm <-> lib <-> bindings
, where we have the need to communicate information across the layers, in concret with the large PR, about the definitions of database objects. For example, we need this in the query layer whereTableDef
hold our metadata and bothvm <-> core
need it.API and ABI
If the API is breaking, please state below what will break
Some bindings internal types (and elsewhere) are moved to sats
Expected complexity level and risk
2