-
Notifications
You must be signed in to change notification settings - Fork 620
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
readtags: canonicalize the input file name based on CWD ptag #3304
Conversation
Do I have to consider windows' file name like C:/foo/bar? |
23e1b91
to
91a8770
Compare
Automatically growing hashtable improves the performance incredibly!
|
09613db
to
1a1b7e7
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3304 +/- ##
==========================================
+ Coverage 82.83% 82.96% +0.13%
==========================================
Files 226 226
Lines 54754 54962 +208
==========================================
+ Hits 45353 45598 +245
+ Misses 9401 9364 -37
☔ View full report in Codecov by Sentry. |
1a1b7e7
to
7732492
Compare
7732492
to
10b8f8a
Compare
aff5476
to
763ff0a
Compare
I decided to just reject a Windows directory in this pull request. |
@AmaiKinono, for solving the first item in #3168, I added the -C,--canonicalize-input option to readtags. I would like you to try this pull request. |
I wonder if these things should be done on the ctags side. |
57b8b62
to
e8aa1ec
Compare
@k-takata, thank you for fixing the title. |
b6b5051
to
185f8b8
Compare
I merged main/fname.c unexpectedly in 8f2e2ee. I must add the test cases for the functions to utiltest in this pull request. |
#3600 must be solved first. |
ebc4a4a
to
cd84392
Compare
cd84392
to
22a82bc
Compare
@AmaiKinono Sorry for delaying finishing this PR. I'm working on -A, --absolute-input in long-form, options now. I want to explain when -A is useful. I frequently read multiple source trees in a set. e.g., systemd+linux kernel, glibc + linux kernel, gimp + gtk, and so on. The combinations of the source tree can be unpredictable. If readtags can take multiple tags files when searching, we can reuse the tags file for linux kernel when reading "glibc + linux", "systemd + linux", "audit + linux", .... If readtags reports the input field of a tag in relative form, a client tool like citre must convert it to an absolute form. Converting is easy if a tool deals with only one tags file; just referring to its CWD ptag is enough. However, if a tool deals with multiple tags files, there are multiple CWD ptags. -A comes here. readtags returns absolute file names. So no conversion is needed. That means I would like to set a list of strings to the value slot of |
22a82bc
to
4ddc82f
Compare
I found one more interesting idea: --assume-cwd=... option. |
4ddc82f
to
538d9f1
Compare
…ileName Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Partially close universal-ctags#3168. TODO: * revise code, Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…edo-tags Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Co-authored-by: AmaiKinono <amaikinono@gmail.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
538d9f1
to
9250706
Compare
That's an exciting feature (and actually requested by a lot of Citre users, on a Chinese Emacs forum). However, when parsing a tagline, a client tool needs some metadata of the tags file, so if readtags outputs taglines in multiple tags files, it may needs to align their metadata. I'll list the metadata used by Citre here:
So, the conclusion is, readtags may need another option to output the kind field in its full-length form, but it's okay to not have it. But this is only for Citre, and we may need to consider what to do if tags files have different ptag values, as ptags are intended for client tools to utilize.
I find the relevant code in Citre to be quite convoluted. I plan to deprecate |
See #3168.
Just illustrating an idea. Still far from merging.