You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an option to add inlining to spm package?
When generating files into an SPM package its a separate compile module so unless properties/functions are marked with @inlinable to my understanding no inlining will occur.
In particular wrapper properties like
public var results: [Result] { __data["results"] }
Will benefit from it.
The text was updated successfully, but these errors were encountered:
ZeeWanderer
changed the title
can we get @inlineable on properties when generation code into SPM package?
can we get @inlinable on properties when generation code into SPM package?
Aug 28, 2024
ZeeWanderer
changed the title
can we get @inlinable on properties when generation code into SPM package?
can we get @inlinable on properties when generating code into SPM package?
Aug 28, 2024
calvincestari
added
feature
New addition or enhancement to existing solutions
codegen
Issues related to or arising from code generation
and removed
question
Issues that have a question which should be addressed
labels
Aug 28, 2024
Hi @ZeeWanderer 👋🏻 - no, there is not any configuration option at the moment to generate @inlinable property accessors.
I'll take this feature request to our next team planning meeting and gather opinion from the rest of the team; could be a week or so before I get back to you though.
Apologies for taking so long to get back to you on this issue - we finally got together to discuss this a bit more.
When generating files into an SPM package its a separate compile module so unless properties/functions are marked with @inlinable to my understanding no inlining will occur.
I believe this used to be the case before Swift 5.8 where a conservative implementation of Cross Module Optimization was introduced as a default compiler optimization. The impact of this should be that if you are compiling the source for all modules at build time then @inlinable has no effect because everything is by default inlinable.
I'm going to close this issue as there does not seem to be any benefit to a adding @inlinable to generated packages. If you were distributing a package containing your generated models as a prebuilt binary then I could see where @inlinable becomes useful. Are there other use cases where you think this is still beneficial?
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.
Question
Is there an option to add inlining to spm package?
When generating files into an SPM package its a separate compile module so unless properties/functions are marked with
@inlinable
to my understanding no inlining will occur.In particular wrapper properties like
Will benefit from it.
The text was updated successfully, but these errors were encountered: