-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve project's modularization. #54
Comments
It looks like it is not possible hide |
While trying to implement this I’ve been leaning towards:
To avoid circular dependencies, in this case, UIKitDiffableTextStyle conformances must be made in DiffableTextViews_iOS. |
It should now be restructured similar to this in the dev_milestone_v3.0.0 branch. |
Maybe it needs to be restructured so styles have access to platform protocols (UIKitDiffableTextStyle). Thinking about it…
|
The above structure works well enough and makes it straight forward to, for example, add additional styles or a macOS target—each in a separate namespace and with explicit dependencies. It is a bit silly to have two targets that only exports, but it is what it is. |
The current structure cannot export text styles, as it would create cyclical dependencies. It is also ill suited for supporting additional platforms such as macOS, because DiffableTextViews becomes too crowded. A solution is to restructure the project as
where the dependencies are
Level 0 —> Level 1 —> Level 2
and the current DiffableTextViews target is split into two new targets: DiffableTextKit (models) and DiffableTextViews_iOS. A new DiffableTextViews then exports based on platform.The text was updated successfully, but these errors were encountered: