Closed halturin closed 4 years ago
Hi,
/home/taras/.vim/plugged/vim-erlang-tags/plugin/../bin/vim_erlang_tags.erl
from the shell? (From the same directory?)vim_erlang_tags.erl -v
to print a verbose output and attach the result?Hi, thanks for getting back.
Here is the result on my side.
According to output.log.gz, the current directory contains more than 16000 Erlang source files, which is too much to be indexed. You probably don't actually want to run vim-erlang-tags on all of these files. My suggestion is to run vim-erlang-tags from the command line and specifying the directories that contain the source files you actually want to index. E.g.:
$ ../bin/vim_erlang_tags.erl src
or
$ ../bin/vim_erlang_tags.erl src deps
not sure about 16K files.
find . -type f -name "*.erl" | wc -l
shows only 177 including vendored dependencies
Hm, that's interesting...
The output.log
file that you sent starts with the following:
In create_tags, To explore: ["_build/default/lib/goldrush/src/glc.erl",
...16358 files...
"test/mx_tests.erl"]
Then it contains log entries about starting to process all those files.
Are those 16k Erlang source files that are in output.log
not actually there in your file system?
i found the reason. there is a symlink to itself in rel
directory
its just a recursion.
@halturin Would you test my modification that doesn't follow symbolic links by default?
dont you think it would be better to have some set of directories that should be ignored?
PS: is there any chance to have an index for the OTP library within the project' dir? as it has been done in vscode
dont you think it would be better to have some set of directories that should be ignored?
You can set directories to be ignored. If you use the vim_erlang_tags.erl
script, you can use the --ignore
option. If you use the :ErlangTags
command, you can do this with the erlang_tags_ignore variable.
Adding a set of default directories to ignore would not be trivial, because that depends on which build system is used by the user (rebar2? rebar3? Erlang.mk? Custom makefiles? Nothing?), and even on the users preference (some people might want to generate the tags for the dependencies in _build
, while other don't). I think it's better to keep vim-erlang-tags
as a simple tool that everyone can use in their preferred way.
PS: is there any chance to have an index for the OTP library within the project' dir? as it has been done in vscode
Just like you can create tags for your own project, you can create an index for the Erlang/OTP source code. I suggest using the vim_erlang_tags.erl
script for that, and updating your vimrc to add the new tag file to its list of tag files:
set tags+=/path/to/tags
I'm not familiar with how VS Code handles Erlang tags. In any case, deciding where to find the source files in outside the scope of this project. Regarding the concrete example, we don't know whether a user has Erlang source on their machine at all. They might have the Erlang source code multiple times. Deciding when to generate source file is also outside the scope of this project.
I pushed the symlink fix into master.
I think we can close this issue. dont you mind?
Yes, I think so.
Ive got this error on ErlangTags command
is there any way to fix it? am i doing something wrong?
PS: Debian 10