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

Doesn't run except by polluting the app's folder #53

Closed adamgit closed 6 years ago

adamgit commented 6 years ago

Great tool, but it seems (From following instructions) that it's configured to only work when you stick the entire project inside your repository, inside your app's folder / xcodeproj - which then pollutes the xcode project (xcode will now see the files, which is very much not what I'd expect/want).

e.g. if I try to run generate-objc-dependencies-to-json.rb from the project folder, it crashes because it's hard-coded to ignore where the script lives, and instead use the current folder as the location for the visualizers binaries. I get, for instance:

ruby: No such file or directory -- ./bin/objc_dependency_tree_generator (LoadError)

e.g. if I try to run generate-objc-dependencies-to-json.rb from its own folder, and tell it where the project is located ... well, I can't. There's no command line option for that.

PaulTaykalo commented 6 years ago

It doesn't care where the projects(sources) are located. All the data is taken from the build artifacts Choose the Command Line Command you desire Some examples are here: https://github.com/PaulTaykalo/objc-dependency-visualizer/wiki/Usage-examples

PaulTaykalo commented 6 years ago

So, you don't need to put it in your project's directory. It's fine to clone this project somewhere and run it from that location. no matter where your proejct is located. Again. this tool doesn't ~give a~ care where project sources are

adamgit commented 6 years ago

Thanks - that was my confusion: I thought it worked from either the project folder or the build-output folder. I didn't realise that it doesn't work with source projects at all.

On 15 December 2017 at 13:57, Paul Taykalo notifications@github.com wrote:

It doesn't care where the projects(sources) are located. All the data is taken from the build artifacts Choose the Command Line Command you desire Some examples are here: https://github.com/PaulTaykalo/objc-dependency- visualizer/wiki/Usage-examples

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PaulTaykalo/objc-dependency-visualizer/issues/53#issuecomment-352011701, or mute the thread https://github.com/notifications/unsubscribe-auth/AAR1-QnACzxWJlmPKq08zjSeZsDMxb1Kks5tAnqvgaJpZM4RDWS5 .

bengotow commented 5 years ago

Just for folks stumbling across this, when I run the tool I don't see any projects, and it looks like this is only searching App Code's build artifacts directory, not Xcode Derived Data (which can be in various locations)

find: /Users/bengotow/Library/Caches/appCode*/DerivedData: No such file or directory
There were 0 directories found
Cannot find projects that starts with ''
MojtabaHs commented 1 year ago

Just for folks stumbling across this, when I run the tool I don't see any projects, and it looks like this is only searching App Code's build artifacts directory, not Xcode Derived Data (which can be in various locations)

find: /Users/bengotow/Library/Caches/appCode*/DerivedData: No such file or directory
There were 0 directories found
Cannot find projects that starts with ''

It searches for both Xcode and appCode:

options[:derived_data_paths] = ['~/Library/Developer/Xcode/DerivedData', '~/Library/Caches/appCode*/DerivedData']

But finds nothing! (for debug). just make sure you are building for release mode