Closed plivesey closed 6 years ago
It's not like an error, it's more like a warning, because you have never installed AppCode :)
Just run without > origin.js
./generate-objc-dependencies-to-json.rb -s "" -D /Users/peter/Library/Developer/Xcode/DerivedData/
And check the result.
If it's swift
project, you can actually try to run with -w
flag.
Check here https://github.com/PaulTaykalo/objc-dependency-visualizer/wiki/Usage-examples
Thanks for the quick response. Running this on MosaicCamera
again, I get the following result:
There were 45 directories found
Last modifications were in
/Users/peter/Library/Developer/Xcode/DerivedData//MosiacCamera-gdvravkbpqymxvesgqnomlgzenbe/Build/Intermediates.noindex/MosiacCamera.build/Debug-iphonesimulator/MosiacCamera.build/Objects-normal/x86_64
directory at
2018-01-05 17:48:48 -0800
var dependencies = {"links":[],"links_count":0,"objects":{}}
I saw this before as the content of origin.js
. It seems like whatever project I run it on, it returns 0 objects. Is installing App Code a prerequisite?
Nope, AppCode
is just an alternative. So it this MosaicCamera
your project that was being compiled last? Also, what language is it using and what Xcode version are you using?
It seems that script cannot find any information about object being used by this project.
(No infomration at DervicedData) driectory. You could try to clean up and recompile everything to check again. Should help. Otherwise, I would likely to see what you have in that directiory in DerivedData
sript mentioning
Hm.. it seems that is something broken at the moment. Will take a look, and will update you with results
Heh. Fixed in https://github.com/PaulTaykalo/objc-dependency-visualizer/commit/4a4800b8c253ef81e43d74a4127bb3c9d8d6fe6c
You can try on your version by running it with
./generate-objc-dependencies-to-json.rb -o ""
or get the latest one from master
I think the same bug also exists for swift projects? Maybe not the same bug, but getting the same result:
$ ./generate-objc-dependencies-to-json.rb -w -s "" -D /Users/peter/Library/Developer/Xcode/DerivedData/ > origin.js
There were 51 directories found
Last modifications were in
/Users/peter/Library/Developer/Xcode/DerivedData//Alamofire-gnorjikcilpwaaejyxitgvrwfeyk/Build/Intermediates.noindex/Alamofire.build/Debug/Alamofire macOS Tests.build/Objects-normal/x86_64
directory at
2018-01-09 10:28:50 -0800
But origin.js
was empty. It seems like it doesn't currently work on swift projects?
It looks for objects in tests target. You should make sure that it looks to the main target instead, You'll need to either rebuild main target, or pass precise directory with object files via -p
Yep, that was it. I wasn't able to find the object files before, but found it now. Thanks.
I'm unable to generate a graph for any project.
Reproduce
./generate-objc-dependencies-to-json.rb -s "" -D /Users/peter/Library/Developer/Xcode/DerivedData/ > origin.js
(note, without the -D I get the error:find: /Users/peter/Library/Caches/appCode*/DerivedData: No such file or directory
)Expected
The graph generates
Actual
Output is:
I'm on Xcode Version 9.2 (9C40b). Is there anything I'm doing wrong?
FYI, here's my derived data setup:
Thanks for your help. This tool seems really useful.