PaulTaykalo / objc-dependency-visualizer

Objective-C and Swift dependency visualizer. It's tool that helps to visualize current state of your project. It's really easy to see how tight your classes are coupled.
MIT License
1.84k stars 98 forks source link

Can't Read .swiftdeps ? #67

Open yingmu52 opened 2 years ago

yingmu52 commented 2 years ago

When I run ./generate-objc-dependencies-to-json.rb -w -s "swift-project-analyzer"

I get the following error

Cannot read file /Users/xinyi/Library/Developer/Xcode/DerivedData/OnePlayer-cqtdohbytzcdggcjripigujhpuhx/Build/Intermediates.noindex/OnePlayer.build/Debug-iphonesimulator/OnePlayer.Example.SwiftUI.build/Objects-normal/x86_64/SwiftUIOnePlayerViewModel.swiftdeps : This is possibly because output file was changed:(/Users/xinyi/Library/Developer/Xcode/DerivedData/OnePlayer-cqtdohbytzcdggcjripigujhpuhx/Build/Intermediates.noindex/OnePlayer.build/Debug-iphonesimulator/OnePlayer.Example.SwiftUI.build/Objects-normal/x86_64/SwiftUIOnePlayerViewModel.swiftdeps): control characters are not allowed at line 1 column 1

Nikoloutsos commented 2 years ago

I face same problem:

Nikoloutsos commented 2 years ago

It works well if you run in Xcode 12.4! I guess something has changes in Xcode 12.5

cbh2000 commented 2 years ago

If my memory is correct, that's when Swift switched to binary .swiftdeps. There is a utility to convert them back into text, but it's in the Swift source and someone would need to compile it.

AppDevGuy commented 1 week ago

I had the same issue and this answer worked for me on Xcode 15.4 built project.