dan-t / rusty-tags

Create ctags/etags for a cargo project
Other
408 stars 32 forks source link

Does not find dependencies in Fedora (32) for emacs #74

Closed admiyo closed 4 years ago

admiyo commented 4 years ago

Generating the code for emacs only finds the code in the current directory. VI version seesm to find depdencies OK in the cargo cache.

cargo install rusty-tags rusty-tags emacs
$ wc -l rusty-tags.emacs 30 rusty-tags.emacs $ wc -l rusty-tags.vi 1023 rusty-tags.vi

Cannot browse into dependencies with emacs

vi generated tags work correctly

dan-t commented 4 years ago

Hi Adam,

does the emacs tags file have include lines for the dependencies? Does your emacs tags plugin support these include lines?

Greetings, Daniel

admiyo commented 4 years ago

I've generated the file with both exuberant and the etags that comes with the emacs RPM.  No difference.

The rusty-tags.emacs file does have the include lines.   Those files are there and are generated.  I am guessing the emacs is just being dumb.

$ cat rusty-tags.emacs

/home/ayoung/devel/rust/rustboot/src/dhcp.rs,1403 ...

/home/ayoung/.rusty-tags/cache/clap-9937940079245099657.emacs,include /home/ayoung/.rusty-tags/cache/mac_address-220633793486163585.emacs,include /home/ayoung/.rusty-tags/cache/num-7472547175417462205.emacs,include /home/ayoung/.rusty-tags/cache/num-traits-495207980669005113.emacs,include

The firstone, clap, pulls in a lot of other dependencies, and those are not generated in the file listed above.  Is Cargo recursion not working?

On 9/14/20 5:25 PM, Daniel Trstenjak wrote:

Hi Adam,

does the emacs tags file have include lines for the dependencies? Does your emacs tags plugin support these include lines?

Greetings, Daniel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dan-t/rusty-tags/issues/74#issuecomment-692322897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABC2O6SIEHS3VKHOE3QAD3SF2C4HANCNFSM4RMB2M2Q.

dan-t commented 4 years ago

The firstone, clap, pulls in a lot of other dependencies, and those are not generated in the file listed above. Is Cargo recursion not working?

The cargo project tags file only contains the direct dependencies. Each dependency gets put a tags file into its source directory inside of „.cargo“. So for clap inside of this tags file it should include its dependencies.

The point behind this is, that you only get the tags that are reachable from your current source file, and therefore reducing the collision of equally named tags.

admiyo commented 4 years ago

Anything not defined with the project is not found.  MacAddress and clap::Args are both in the Cargo.toml file, and you can see the includes above, but "No defintinons found for: MacAddress" and so on.

It looks like it is not expandind the included dependencies in the local tags file.

On 9/15/20 6:35 PM, Daniel Trstenjak wrote:

The firstone, clap, pulls in a lot of other dependencies, and those are not generated in the file listed above. Is Cargo recursion not working?

The cargo project tags file only contains the direct dependencies. Each dependency gets put a tags file into its source directory inside of „.cargo“. So for clap inside of this tags file it should include its dependencies.

The point behind this is, that you only get the tags that are reachable from your current source file, and therefore reducing the collision of equally named tags.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dan-t/rusty-tags/issues/74#issuecomment-693015151, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABC2OYWKJ6EZAP2XXOV4XDSF7T2NANCNFSM4RMB2M2Q.

dan-t commented 4 years ago

It looks like it is not expandind the included dependencies in the local tags file.

Ok, then it looks like this is the case.

Have you tried the emacs tags plugin mentioned in the readme? This one should support the include lines.

admiyo commented 4 years ago

Will close, as it seems to be the Tags generation, and not rusty-tags