Skip to content
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

[SR-7718] Build fails if you move the package directory #4815

Open
keith opened this issue May 17, 2018 · 0 comments
Open

[SR-7718] Build fails if you move the package directory #4815

keith opened this issue May 17, 2018 · 0 comments
Labels

Comments

@keith
Copy link
Collaborator

keith commented May 17, 2018

Previous ID SR-7718
Radar rdar://problem/35442211
Original Reporter @keith
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: ed63257651ef0e1c7e496441a99b4139

Issue Description:

If you move an package's directory between builds, the build fails with this error:

<unknown>:0: error: PCH was compiled with module cache path '/private/tmp/foo/.build/x86_64-apple-macosx10.10/debug/ModuleCache/F6Q938U2LW28', but the path is currently '/private/tmp/bar/.build/x86_64-apple-macosx10.10/debug/ModuleCache/F6Q938U2LW28'
<unknown>:0: error: missing required module 'SwiftShims'
error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /private/tmp/bar/.build/debug.yaml main output:

To reproduce:

cd /tmp
mkdir foo
cd foo
swift package init
swift build
cd ..
mv foo bar
cd bar
swift build

I believe you also can have this same issue when you change Xcode versions between builds.

I think in both of these cases, the files should just be rebuilt automatically, instead of having to `rm -rf .build` and build again.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants