profile
viewpoint
Daniel Trstenjak dan-t Dresden, Germany

dan-t/rusty-tags 294

Create ctags/etags for a cargo project

dan-t/cabal-bounds 63

Set the version bounds of dependencies in a cabal file

dan-t/cabal-cargs 18

Extract the compiler arguments from a cabal file.

dan-t/rusty-release 12

Make a release of a cargo project

dan-t/layers 8

A prototypical 2d platform game

dan-t/cabal-lenses 5

Lenses and traversals for the Cabal library.

dan-t/vim-cpp-include 5

Extend the include list of a C/C++ source file

dan-t/confsolve 3

Generalized file conflict resolving tool.

dan-t/dropsolve 2

A command line tool for resolving dropbox conflicts.

dan-t/Gamgine 2

Some kind of game library or set of utilities

created tagdan-t/rusty-tags

tagv3.8.1

Create ctags/etags for a cargo project

created time in 13 hours

push eventdan-t/rusty-tags

Daniel Trstenjak

commit sha ca08d2a5a8e26e6b1666dcf670445ae08f2c9e4b

rusty-tags 3.8.1

view details

push time in 13 hours

push eventdan-t/rusty-tags

Daniel Trstenjak

commit sha 5644866add0c54ead99595d4d91ee9a8843253ce

Beautify error format

view details

push time in 13 hours

issue closeddan-t/rusty-tags

tags for rust standard library not generated

Hi,

After install rusty-tags from cargo install or from this Git repo with cargo build I use the rusty-tags setting RUST_SRC_PATH env variable.

From verbose mode I see

❯ rusty-tags --force-recreate --verbose  vi
Switching to single threaded for verbose output
Using configuration: vi_tags='rusty-tags.vi', emacs_tags='rusty-tags.emacs', ctags_exe='Some("/home/albertop/GitHub/ctags/ctags")', ctags_options=''
Found ctags executable: UniversalCtags("/home/albertop/GitHub/ctags/ctags")
Fetching source and metadata ...
Creating tags for the standard library ...

Creating tags ...
   with command: "/home/albertop/GitHub/ctags/ctags" "--recurse" "--languages=Rust" "-o" "/home/albertop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/.tmpflvfrb"

   for source:

   cached at:
      /home/albertop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/.tmpflvfrb

Move tags ...
   from:
      /home/albertop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/.tmpflvfrb
   to:
      /home/albertop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rusty-tags.vi
Found package of (files, 0.1.0) with source at '/home/albertop/Dev/rust/files/src'
Found workspace members: [(files, 0.1.0)]
Building tree for (files, 0.1.0)
Creating tags for: files ...

Tags for cargo project are ok but not for standard library.

Workaround is to run ctags under $RUST_SRC_PATH manually.

closed time in 14 hours

albertopatino

issue commentdan-t/rusty-tags

tags for rust standard library not generated

rusty-tags 3.8.0 should now solve the issue and you can now use:

export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library/
albertopatino

comment created time in 14 hours

push eventdan-t/rusty-tags

Daniel Trstenjak

commit sha 3003be5f0914aa42b974f41353bd69b95cae86f9

Fix README

view details

push time in 14 hours

created tagdan-t/rusty-tags

tagv3.8.0

Create ctags/etags for a cargo project

created time in 14 hours

push eventdan-t/rusty-tags

Daniel Trstenjak

commit sha e32b2ad831385fc2ff207de22abaa4bbb9b36f82

Fix standard library tags creation for rustc >= 1.47.0

view details

Daniel Trstenjak

commit sha eb84678c21319d57d9a2ba1f7c6ee1b9a6f29c96

rusty-tags 3.8.0

view details

push time in 14 hours

issue commentdan-t/rusty-tags

tags for rust standard library not generated

On Sun, Oct 25, 2020 at 09:40:01PM -0700, Alberto Patino wrote:

Thanks a lot for follow up and investigation from your side. I'm wondering how this didn't come up before :-) as I'm really new to Rust. I was wondering why your source code was looking at directories with not much sense to me.

If you're new to rust and don't have a particular reason to use the nightly compiler version, then I can only recommend to you to use the stable compiler version.

You will most likely run into less issues.

albertopatino

comment created time in 21 hours

IssuesEvent

issue commentdan-t/rusty-tags

tags for rust standard library not generated

Ok, here's the explanation: https://www.reddit.com/r/rust/comments/jf92en/rustup_rustsrc_for_toolchains_stable_and_nightly/g9j5xfl/

albertopatino

comment created time in 6 days

issue commentdan-t/rusty-tags

tags for rust standard library not generated

Hi Alberto,

for whatever reason there seems to be a difference in the source for the stable and nightly toolchain. I'm trying to get some infos why that's the case. For now only the source layout of the stable toolchain is supported.

Greetings, Daniel

albertopatino

comment created time in 6 days

issue commentdan-t/rusty-tags

tags for rust standard library not generated

Hi Alberto,

❯ echo $RUST_SRC_PATH /home/albertop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library

that path doesn't look right.

dan@octa ~> echo $RUST_SRC_PATH /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/

dan@octa ~> ls -la /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library ls: cannot access '/home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library': No such file or directory

But then when using this rusty-tags.vi file I see a wrong behaviour, from a simple rs file I go to push definition from Vec using Neovim and Visual Studio Code, but from Neovim using rusty-tags I get push() definicion from slice.rs file. Same test in VS Code I get push() definition from vec.rs file.

If there're multiple 'push' methods defined, then tags - by definition - can't jump to the right place, because there's no type information. The 'push' symbol is just looked up in the tags file and the first found definition is used. Your editor has a shortcut to go through all the 'push' definitions.

Looking inside of my 'rusty-tags.vi' file for $RUST_SRC_PATH and searching for lines starting with 'push', I see:

push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/benches/slice.rs /^fn push(b: &mut Bencher) {$/;" f push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/collections/binary_heap.rs /^ pub fn push(&mut self, item: T) {$/;" P implementation:BinaryHeap push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/collections/btree/node.rs /^ pub fn push(&mut self, key: K, val: V) {$/;" P implementation:NodeRef push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/collections/btree/node.rs /^ pub fn push(&mut self, key: K, val: V, edge: Root<K, V>) {$/;" P implementation:NodeRef push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/string.rs /^ pub fn push(&mut self, ch: char) {$/;" P implementation:String push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/vec.rs /^ pub fn push(&mut self, value: T) {$/;" P implementation:Vec push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/ffi/os_str.rs /^ pub fn push<T: AsRef<OsStr>>(&mut self, s: T) {$/;" P implementation:OsString push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/path.rs /^ pub fn push<P: AsRef<Path>>(&mut self, path: P) {$/;" P implementation:PathBuf push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sync/mpsc/mpsc_queue.rs /^ pub fn push(&self, t: T) {$/;" P implementation:Queue push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sync/mpsc/spsc_queue.rs /^ pub fn push(&self, t: T) {$/;" P implementation:Queue push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sys/sgx/waitqueue.rs /^ pub unsafe fn push<'a>(&mut self, entry: &'a mut UnsafeListEntry<T>) -> &'a T {$/;" P implementation:unsafe_list::UnsafeList push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sys/unix/process/process_common.rs /^ pub fn push(&mut self, item: CString) {$/;" P implementation:CStringArray push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sys/vxworks/process/process_common.rs /^ pub fn push(&mut self, item: CString) {$/;" P implementation:CStringArray push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sys_common/at_exit_imp.rs /^pub fn push(f: Box<dyn FnOnce()>) -> bool {$/;" f push /home/dan/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sys_common/wtf8.rs /^ pub fn push(&mut self, code_point: CodePoint) {$/;" P implementation:Wtf8Buf

So the first one is from 'slice.rs', I don't know why 'Visual Studio Code' takes the one from 'vec.rs'.

Greetings, Daniel

albertopatino

comment created time in 8 days

issue commentdan-t/rusty-tags

tags for rust standard library not generated

Hi Alberto,

in which way aren't they generated?

Doesn't '/home/albertop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rusty-tags.vi' contain any tags?

Can't you access tags of the standard library in vim?

Does your vim tags setting contain $RUST_SRC_PATH, like described in the README: autocmd BufRead *.rs :setlocal tags=./rusty-tags.vi;/,$RUST_SRC_PATH/rusty-tags.vi

Greetings, Daniel

albertopatino

comment created time in 13 days

issue commentdan-t/rusty-tags

Does not find dependencies in Fedora (32) for emacs

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

comment created time in a month

issue commentdan-t/rusty-tags

Does not find dependencies in Fedora (32) for emacs

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

comment created time in a month

issue commentdan-t/rusty-tags

Does not find dependencies in Fedora (32) for emacs

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

comment created time in a month

startedrust-lang/mdBook

started time in 2 months

created tagdan-t/rusty-tags

tagv3.7.0

Create ctags/etags for a cargo project

created time in 3 months

push eventdan-t/rusty-tags

Daniel Trstenjak

commit sha 3bdfff015780b5652a00986675c1f3b32be10fff

rusty-tags 3.7.0

view details

push time in 3 months

issue commentdan-t/rusty-tags

Broken feature omit dependencies

I commited a fix. Please test!

UnkwUsr

comment created time in 3 months

push eventdan-t/rusty-tags

Daniel Trstenjak

commit sha f7190b98706eba4ccbf25fd4b8ab2795feb96896

Fix '--omit-deps' option

view details

push time in 3 months

more