-
Notifications
You must be signed in to change notification settings - Fork 325
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
Refactor: Create wire-api package for types used in the public API #1090
Conversation
also should move: Legalhold Code Misc/Location? Misc/PlaintextPassword? Range? List1?
This reverts commit fb2c1a3626411c004a125b641f522cccc8dae306.
054abd4
to
4dbd75a
Compare
That i would have liked to see in a separate PR, but it's certainly a good change. |
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 haven't read the whole thing, but I am reasonably confident this is good to go, except for some small things.
Also, two questions about the intended structure (not arguing for more change in this PR):
- So what is the purpose of
types-common
in contrast towire-api
? Why aren't they just one package? - And what is the purpose of
*-types
packages in the future? Can they be resolved intotypes-common
orwire-api
? If not, how are they conceptually separate?
Good questions.
Right now, as we are depending on
At the moment their purpose is a bit unclear and they mostly exist in their current form to avoid changing too much code at once. For the future: Types used in the public API belong in |
I still prefer to add interal apis to wire-api in Otherwise 👍 |
See https://github.com/zinfra/backend-issues/issues/1416.
This allows a clearer separation between the public interface and internal data structures. This is becoming more important with the upcoming federation changes, which will change internal representations while keeping a backwards-compatible API.
Things coming with this PR:
wire-api
package (mostly client API, but also some bot/provider stuff)I do not intend to change any definitions, just move them around (+ some formatting). This is supposed to be a pure refactoring.
Steps needed before this can be merged:
wire-api
tests compilewire-api.cabal
file*-types
that I copied over, still (re-)exporting it (to avoid diffs in import sites)Cleanup I would like to do if there is time: