Ensure DEVELOPER_DIR
is used in all swiftc
calls
#1819
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #1816
Short description 📝
In the event
xcode-select -p
mismatches the environment variableDEVELOPER_DIR
tuist generate
would fail to for projects withProjectDescriptionHelpers
.This was happening due to
ProjectDescriptionHelpers
getting compiled with the default version Xcode ignoring theDEVELOPER_DIR
environment variable, whereas the manifests were respecting the environment variable causing a mismatch in Swift versions used during the loading process.Solution 📦
Ensure all manifest loading operations (all calls to
swiftc
) respect theDEVELOPER_DIR
environment variable.Implementation 👩💻👨💻
PATH
was not required, removed to minimise changes)manifestLoadingVariables
for all manifest loading operations (to ensure consistent version of Swift is used)manifestLoadingVariables
for all manifest hashing operations (to ensure cache is invalidated in case of switch Xcode versions)Test Plan 🛠
sudo xcode-select -s /Applications/Xcode11.5.app/Contents/Developer
)tuist
usingbundle exec rake local_package
build/tuist
rm ~/.tuist/Cache
build/tuist/tuist generate --path fixtures/ios_app_with_helpers
export DEVELOPER_DIR=/Applications/Xcode12.app/Contents/Developer
)rm ~/.tuist/Cache
build/tuist/tuist generate --path fixtures/ios_app_with_helpers