-
Notifications
You must be signed in to change notification settings - Fork 6
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
How is header file name with sub-folder name supposed to work together? #14
Comments
Hi @shreyasbharath, any comments? |
Hey @fracting , apologies for the late reply. I haven't looked at this in a couple of years, I'll need to dig in a bit to figure out what the issue is. Let me look into it tomorrow if possible. |
Thanks a lot for response! If you have a crypto wallet, I would be glad to send a one time gift unconditionally to express my appreciation on your past work on this project! |
Ah no, I didn't start this for money. I'll take a look tomorrow, I have some spare time this weekend. |
So I've had a quick look and this is not a bug per se, the gem assumes that your project enforces unique filenames. Is this not the case for your project? |
Hi, thanks a lot for the help! No in my project there is no guarantee of uniqueness of file names, and I have no way to change that because it’s actually a third party open source project that I want to analyse and contribute to. Do you think it’s hard to modify cpp-dependency-graph to take folders into consideration? I haven’t written anything in ruby but it you can give me some hints I might try. Alternatively, if you know any similar tools that take folders into consideration could you please recommend? Thanks! |
Okay let me have a go at fixing this. My coding skills have gotten rusty over the past few months so it's a good opportunity for me to flex my coding muscle 😁 |
Can you give this #15 a go and let me know if it fixes your issue? It's a bit hacky but I can tidy it up before merging. |
Thanks a lot! I'm testing, will feedback in 10 minutes. |
Sorry, my environment was broken, I'm fixing it, first time building a ruby project from source, will update soon! |
Update: after fixing the build environment, I can confirm the WIP branch works for my minimal example project (https://github.com/fracting/cpp_dependency_graph_minimal) I'm now going to test it with the real project ( https://github.com/oxen-io/lokinet ) and will report back later. Thanks! |
I tested the WIP cpp_dependency_graph against https://github.com/oxen-io/lokinet, previous there were a lot of cyclic dependencies Now with the WIP fix there are no cyclic dependencies at all. I'm not sure if it is really the case that lokinet does not have cyclic dependencies at all, or cpp_dependency_graph from the WIP branch fails to detect any cyclic dependencies, I'll need to manually check some files and report back later. |
It seems there are some cyclic dependencies missed by the WIP cpp_dependency_graph. For example: From https://github.com/oxen-io/lokinet/blob/e11f5018c241ce988104d539cb4c0e962c3d44ed/llarp/service/context.cpp#L4
At the same time, from https://github.com/oxen-io/lokinet/blob/e11f5018c241ce988104d539cb4c0e962c3d44ed/llarp/handlers/tun.cpp#L16
However, the WIP cpp_dependency_graph doesn't report any dependency between
(
from the parent directory of the |
Hey @fracting apologies again, been a crazy few weeks! I can take a look next weekend 🙂 |
Dear team,
I have the following folder structure:
the content of file1.cpp is:
dir3/collision.hpp
does not exist in the above demo folderdir2/collision.hpp
is empty.source: https://github.com/fracting/cpp_dependency_graph_minimal
When I run
cpp_dependency_graph visualise_project --root_dir ./dir
I got the following chart:This is a surprise to me because I expect
dir1
not to depend ondir2
.Could you kindly clarify if this is indeed a bug, or if there is a specific parameter adjustment that would ensure
dir1
does not appear to depend ondir2
in the resulting dependency chart?My actual use case is more complex than the provided example, which I've simplified for clarity and ease of discussion.
Any advice is appreciated, thanks!
The text was updated successfully, but these errors were encountered: