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
Missing generated Bundle.module #4095
Comments
I think the point is that we are not generating the Not a big expert of the Bundle generation part, what do you think @kwridan @fortmarek @pepicrft ? |
It's worth checking whether we get to this line and what the value of For now, you should also be able to override |
tried with: targetSettings: [
"A_SDK": ["SWIFT_PACKAGE": false],
"B_SDK": ["SWIFT_PACKAGE": false],
"C_SDK": ["SWIFT_PACKAGE": false],
] but didn't worked for me... |
used like this: extension Bundle {
class var current: Bundle {
return Bundle(for: A_SDK.self)
}
class var resolved: Bundle {
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle.current
#endif
}
} |
Hey @apps4everyone, do you have a reproducible sample? Maybe with the project attached by @KarimAlweheshy? |
@apps4everyone for swift the debug flags are passed in
|
@fortmarek thx for you suggestions, unfortunately I can't share the project because the SDK's are internal. But the use only the #if SWIFT_PACKAGE flag which is not custom. (it's from SWIFT) @danyf90 thx, tested this but didn't worked for me |
SWIFT_PACKAGE is active but there is no Bundle.module, so with or without targetSettings ["SWIFT_ACTIVE_COMPILATION_CONDITIONS": ["$(inherited)"]] the compilation is failing. In my opinion the only solution would be to generate this even without resources as suggested before. @danyf90 |
SWIFT_PACKAGE doumentation: |
this bug is preventing us from migration to Dependencies.swift now for weeks. How much work would i be to generate the see migration hint for 3.0: #4068 (comment) |
@apps4everyone I think it shouldn't be a problem to generate the file anyway, do you want to have a look at it? 🙏 |
agree, it should be fine to generate the file regardless of whether the module has any resources 👍 |
@danyf90 do you think it's only removing this line? |
Not sure if tuist will complain because there are no resources, you can try and see if it is enough 🙏 |
MessageKit has resources.. it's not imported by tuist for some reason |
and maybe that's why the .module is not generated |
Thanks for pointing out! I think the problem is that Tuist does not support (yet) automatically imported resources from SPM. It had been implemented at some point, but it has some problems and we had to revert it here and didn't had the time to have a look at it yet. If you want to give it a try, let us know and we can try to find a solution together! |
thx for the infos. Looks like we could label this as a bug? |
Here's a reference to how Apple handles different data in SPM |
Just a note: still a bug with tuist 3.0.1 |
I see the problem here to be more fundamental to adopting tuist.. we will always have to catch up on mirroring SPM behaviors in tuist for current and future versions Is the tuist team aware about this challenge? What's the plan here? |
@KarimAlweheshy yes we are aware of that, and we plan to keep updating Tuist when needed |
sadly no update here, unfortunately way to complex to solve with a PR for none core tuist contributors like me. |
Describe the bug
Bundle.module is not generated for external SPM dependency
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Project builds.
Screenshots
Desktop (please complete the following information):
Additional context
IS_SPM is a macro added to the dependency's build settings.
The text was updated successfully, but these errors were encountered: