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
Manifest targets are now static frameworks (to avoid link errors) #287
Manifest targets are now static frameworks (to avoid link errors) #287
Conversation
- The manifest target can be built to ensure there are no syntax errors in the project manifests - This target doesn't need to be linked, a compilation step is sufficient to serve its purpose - By converting the manifest target to a static framework, the link step is skipped and the errors that were obtained during that step can be avoided all together Test Plan: - Run `tuist generate` on any fixture within `fixtures` - Open the generated workspace (you can use `tuist focus` as a shortcut to those steps) - Build the `<Project>-Manifest` scheme in Xcode - Verify no link errors appear
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't a fix per se - but rather another approach that doesn't yield those issues
buildSettings["SWIFT_INCLUDE_PATHS"] = frameworkParentDirectory.asString | ||
buildSettings["SWIFT_VERSION"] = Constants.swiftVersion | ||
buildSettings["LD"] = "/usr/bin/true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I omitted these settings as they are no longer needed to get the target to compile while it's a static framework.
Codecov Report
@@ Coverage Diff @@
## master #287 +/- ##
==========================================
- Coverage 87.92% 87.91% -0.02%
==========================================
Files 268 268
Lines 9402 9393 -9
==========================================
- Hits 8267 8258 -9
Misses 1135 1135
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @kwridan
Resolves #286
Short description 📝
The generated manifest target (e.g. "MyProject-Manifest") is used to allow code completion on the project manifest files (
Project.swift
) as well as validate the code written within it is syntacticly valid.Building this target will succeed however a few linker errors do appear as a consequence:
e.g.
Solution 📦
The link step can be skipped all together by declaring the manifest target will be staticly linked.
Implementation 👩💻👨💻
.staticFramework
Test Plan 🛠
tuist generate
on any fixture withinfixtures
tuist focus
as a shortcut to those steps)<Project>-Manifest
scheme in Xcode