objc-dependency-visualizer icon indicating copy to clipboard operation
objc-dependency-visualizer copied to clipboard

Can't Read .swiftdeps ?

Open yingmu52 opened this issue 2 years ago • 4 comments

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

yingmu52 avatar Jul 23 '21 18:07 yingmu52

I face same problem:

  • Xcode 12.5.1
  • Simulator iPhone 8 (14.4)

Nikoloutsos avatar Aug 03 '21 11:08 Nikoloutsos

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

Nikoloutsos avatar Aug 03 '21 13:08 Nikoloutsos

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.

cbh2000 avatar Oct 29 '21 16:10 cbh2000