-
-
Notifications
You must be signed in to change notification settings - Fork 610
Support configuring the access level of synthesized interfaces #7541
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
Comments
Detecting the enablement of the flag at generation-time will be a bit tricky, since the flag can be defined in In the same way we have let target = Target(
name: "MyApp",
options: .options(bundleAccessor: .bundleAccessor(accessLevel: .public)
) That information can then be used at generation time to override this default. What do you think @tuist/community-core ? |
You might be able to simplify this by using the I think something like this might work for everyone:
|
Love the idea @JoeSzymanskiNoom! I was not aware of |
@pepicrft I implemented @JoeSzymanskiNoom's idea: #7550 Are you happy to close this issue with this fix? or would still like to explore the configuration option? |
Why is this needed?
When using
-enable-upcoming-feature InternalImportsByDefault
, there is a compilation issue in the generated resource access code.The enablement of the Swift feature
AccessLevelOnImport
causes compiling issues with synthesized interfaces defaulting to public.This is because returned
InternalImportsByDefault
flag requires that if your API returns values from an imported framework on a public API interface, then you must make that importPublic
.Steps to address the need
We should provide an interface where developers can configure the access level of those synthesized interfaces.
(optional/nice to have) I think a good addition would also be to check the graph and if nothing depends on a project. then its accessors should default to internal
The text was updated successfully, but these errors were encountered: