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

error: unable to open dependencies file #76289

Open
sger opened this issue Sep 5, 2024 · 3 comments
Open

error: unable to open dependencies file #76289

sger opened this issue Sep 5, 2024 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

@sger
Copy link

sger commented Sep 5, 2024

Description

Hello,

I'm not sure if this related to swift or spm but by using the latest beta 6 of Xcode 16 with swift 5 produces the following error:

error: unable to open dependencies file (/Users/user/Library/Developer/Xcode/DerivedData/MyProject-cgglnsxtnpiyjcazixtikurdbcqd/Build/Intermediates.noindex/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/arm64/MyProject-master-emit-module.d) (in target 'MyProject' from project 'MyProject')

By switching compilation mode to whole module instead of incremental project builds correctly.

Reproduction

error: unable to open dependencies file (/Users/user/Library/Developer/Xcode/DerivedData/MyProject-cgglnsxtnpiyjcazixtikurdbcqd/Build/Intermediates.noindex/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/arm64/MyProject-master-emit-module.d) (in target 'MyProject' from project 'MyProject')

Expected behavior

Project should be with incremental compilation mode.

Environment

swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx14.0

Additional information

No response

@sger sger added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Sep 5, 2024
@sananthanarayan
Copy link

Have you tried clearing derived data. This is the steps to do that:

  • Go to Xcode > Settings > Locations > Click on the arrow next to “Derived Data”.
  • Delete the folder associated with your project and try building again.

Otherwise try switching to whole model compilation temporarily to see if that resolves it using these settings:

  • In Xcode, go to Build Settings > Swift Compiler - Code Generation.
  • Set Compilation Mode to Whole Module for now.

Try manually deleting Build Artifacts or Check Swift Package manager dependencies (if this is a scenario)

Run this command to check file permissions:
sudo chmod -R 755 ~/Library/Developer/Xcode/DerivedData

Keep an eye on Xcode beta update to see if it resolves the issue

@sger
Copy link
Author

sger commented Sep 11, 2024

Thanks @sananthanarayan I have tried all the things that you mentioned for the moment only whole module works.

@pranabsatyal
Copy link

Hello,

I’m encountering a similar issue in XCode that started after updating to Xcode version 16.2. The error message I receive is as follows:

error: unable to open dependencies file (/Users/user/Library/Developer/Xcode/DerivedData/MyProject-cwpcmnebzjpgkzcuoauxlaeiqrsg/Build/Intermediates.noindex/MyProject.build/Debug-iphoneos/MyProject.build/Objects-normal/arm64/MyProject-master.d) (in target 'MyProject' from project 'MyProject')

This problem didn’t occur with XCode 16.1; the project was building successfully before the update. However, even reverting to XCode 16.1 now doesn’t resolve the issue anymore.

Here’s what I’ve tried so far, without success:

  1. Switched the compilation mode to “Whole Module”
  2. Cleaned the build folder
  3. Cleared Derived Data
  4. Deleted XCode 16.2, reinstalled XCode 16.1

Has anyone else experienced this issue?

Thank you in advance for any suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

3 participants