Separate packages for AtProto and Bsky Lexicons #191
Replies: 1 comment 1 reply
-
With respect to the lack of initializers on With respect to modularity, it's a goal I've been trying to work on. There’s ongoing work (example: #181) to reduce duplicate code and make components more reusable. Furthermore, A lexicon generator will go a long way into fixing your pain points. However, building this generator is non-trivial. I want it to produce Swift code that’s properly readable and fits with the API Design Guidelines and I don't want to be lazy with this. I’m leveraging Apple’s OpenAPI generator for part of this, but it’s not a complete solution; some lexicons don’t map cleanly to Just to be transparent: ATProtoKit is a large and evolving project, and I’m only one person. My personal energy and bandwidth do have an impact on how quickly things move and what gets prioritized. Suggestions sometimes fall through the cracks, but it’s not intentional. Your feedback is valuable, and I’m always looking for feedback and considering them, even if I can’t act on everything immediately. TL;DR:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There are use-cases where custom lexicons will need to use definitions from other lexicon packages as standard building blocks. For instance, BlobReference and ReplyReference are good candidates to re-use within custom lexicons. However, both do not have initializer functions in the AtProtoKit and Swift extensions are barred from introducing initializers to another package's public types. With an AtProtoKit hat on for only managing AtProto and Bsky lexicons, this might make sense as the package encapsulates the creation of these internally. But, that limits customization or extensions to lexicons and the use of the kit for those lexicons. The only option is to clone them and any references that may include them and be reusable. If these lexicons were in separate packages with all initializers, components of these lexicons would be more reusable. Would be curious to hear your perspective on making components of these lexicons re-usable within custom lexicons.
Beta Was this translation helpful? Give feedback.
All reactions