From: Yuri Volchkov <yuri.volchkov@gmail.com>
To: Jani Nikula <jani@nikula.org>, Notmuch Mail <notmuch@notmuchmail.org>
Cc: Tomi Ollila <tomi.ollila@iki.fi>
Subject: Re: [PATCH] build: generate cscope and etags source indexes
Date: Thu, 24 Aug 2017 12:11:54 +0200 [thread overview]
Message-ID: <tza4s2a82pl1g5.fsf@N-1128.office.hd> (raw)
In-Reply-To: <CAB+hUn-SvNZemir9q6UoyGEjxfE=FxPTNKqVamn+-BZWYHqDuQ@mail.gmail.com>
Jani Nikula <jani@nikula.org> writes:
> On Thu, Aug 24, 2017 at 12:13 PM, Yuri Volchkov <yuri.volchkov@gmail.com> wrote:
>>>> $ git ls-files | gtags -f -
>> I was trying to adapt developing patterns from the linux kernel, to
>> which I used to. This was my bias :)
>>
>> The good thing about this approach is that only those files will be
>> indexed, which are actually build in the current configuration. For
>> linux it is absolutely must, because there is a huge number of
>> functions, implemented differently for different architecture or
>> configuration option. So only relevant files are getting into the
>> index.
>>
>> However, I agree, a relatively small project as notmuch, almost does not
>> suffer from this problem.
>
> FWIW I use the above snippet also for kernel work. More often than not
> I want to find all the references. I think this is even more so for
> notmuch, where you're more likely to do project wide refactoring.
>
>>>> In theory you'll be able to look at $(SRCS) for indexing... but those
>>>> are only the .c/.cc files. Are your tools clever enough to follow
>>>> #include directives to index the headers as well?
>> Oops. Honestly this thing have slipped from my mind. I'll fix this if we
>> decided this feature is needed, and if the result will not look too ugly.
>
> Not that the kernel tags targets are a good example for anything, but
> they do use a bunch of complicated shell scripting to find the sources
> in the file system. They don't look at the sources defined by
> Makefiles for the configuration options. Figuring out the header files
> in Makefiles is more trouble than it's worth.
Well, for my needs kernel tags doing pretty good job. Partially because
I use helm-git-grep whenever I need project-wide refactoring.
But I agree, that machinery for building index is way too complicated in
the kernel. That's why I said "not too ugly".
>
>> Also I have never tried gnu global. I need to check it out too. And
>> again, if decided this helper is needed, I'll add gnu global too.
>
> Really the simplest thing for gnu global is to just run 'gtags' in the
> top level directory, and let it recursively handle all files it
> understands. Having to run 'make gtags' is not much of a convenience!
> ;)
I feel convinced. Just forget about this patch.
>
> BR,
> Jani.
prev parent reply other threads:[~2017-08-24 10:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 20:55 [PATCH] build: generate cscope and etags source indexes Yuri Volchkov
2017-08-24 5:51 ` Jani Nikula
2017-08-24 6:49 ` Tomi Ollila
2017-08-24 9:13 ` Yuri Volchkov
2017-08-24 9:55 ` Jani Nikula
2017-08-24 10:11 ` Yuri Volchkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tza4s2a82pl1g5.fsf@N-1128.office.hd \
--to=yuri.volchkov@gmail.com \
--cc=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).