* [tarantool-patches] [PATCH] build: tags -- Exclude unneeded directories
@ 2019-03-02 14:44 Cyrill Gorcunov
2019-03-02 15:10 ` [tarantool-patches] " Cyrill Gorcunov
0 siblings, 1 reply; 8+ messages in thread
From: Cyrill Gorcunov @ 2019-03-02 14:44 UTC (permalink / raw)
To: tarantool
When building "tags" target we scan the whole working
directory which is redundant. In particular .git,.pc,patches
directories should not be scanned for sure.
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: tarantool.git/CMakeLists.txt
===================================================================
--- tarantool.git.orig/CMakeLists.txt
+++ tarantool.git/CMakeLists.txt
@@ -137,7 +137,10 @@ check_function_exists(getprogname HAVE_G
#
# Enable 'make tags' target.
#
-add_custom_target(tags COMMAND ${CTAGS} -R -f tags
+list(APPEND tagsExclude "--exclude=.git/")
+list(APPEND tagsExclude "--exclude=.pc/")
+list(APPEND tagsExclude "--exclude=.patches/")
+add_custom_target(tags COMMAND ${CTAGS} -R ${tagsExclude} -f tags
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
add_custom_target(ctags DEPENDS tags)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [tarantool-patches] Re: [PATCH] build: tags -- Exclude unneeded directories
2019-03-02 14:44 [tarantool-patches] [PATCH] build: tags -- Exclude unneeded directories Cyrill Gorcunov
@ 2019-03-02 15:10 ` Cyrill Gorcunov
2019-03-02 15:40 ` [tarantool-patches] [PATCH v2] " Cyrill Gorcunov
0 siblings, 1 reply; 8+ messages in thread
From: Cyrill Gorcunov @ 2019-03-02 15:10 UTC (permalink / raw)
To: tarantool
On Sat, Mar 02, 2019 at 05:44:34PM +0300, Cyrill Gorcunov wrote:
> When building "tags" target we scan the whole working
> directory which is redundant. In particular .git,.pc,patches
> directories should not be scanned for sure.
drop it please, there is a typo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [tarantool-patches] [PATCH v2] build: tags -- Exclude unneeded directories
2019-03-02 15:10 ` [tarantool-patches] " Cyrill Gorcunov
@ 2019-03-02 15:40 ` Cyrill Gorcunov
2019-03-04 9:57 ` Vladimir Davydov
2019-03-04 15:44 ` Vladimir Davydov
0 siblings, 2 replies; 8+ messages in thread
From: Cyrill Gorcunov @ 2019-03-02 15:40 UTC (permalink / raw)
To: tarantool
When building "tags" target we scan the whole working
directory which is redundant. In particular .git,.pc,patches
directories should not be scanned for sure.
---
v2:
- fix typos
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: tarantool.git/CMakeLists.txt
===================================================================
--- tarantool.git.orig/CMakeLists.txt
+++ tarantool.git/CMakeLists.txt
@@ -137,7 +137,10 @@ check_function_exists(getprogname HAVE_G
#
# Enable 'make tags' target.
#
-add_custom_target(tags COMMAND ${CTAGS} -R -f tags
+list(APPEND tagsExclude "--exclude=.git/*")
+list(APPEND tagsExclude "--exclude=.pc/*")
+list(APPEND tagsExclude "--exclude=patches/*")
+add_custom_target(tags COMMAND ${CTAGS} -R ${tagsExclude} -f tags
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
add_custom_target(ctags DEPENDS tags)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [tarantool-patches] [PATCH v2] build: tags -- Exclude unneeded directories
2019-03-02 15:40 ` [tarantool-patches] [PATCH v2] " Cyrill Gorcunov
@ 2019-03-04 9:57 ` Vladimir Davydov
2019-03-04 10:09 ` Cyrill Gorcunov
2019-03-04 15:44 ` Vladimir Davydov
1 sibling, 1 reply; 8+ messages in thread
From: Vladimir Davydov @ 2019-03-04 9:57 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: tarantool
On Sat, Mar 02, 2019 at 06:40:12PM +0300, Cyrill Gorcunov wrote:
> When building "tags" target we scan the whole working
> directory which is redundant. In particular .git,.pc,patches
> directories should not be scanned for sure.
> ---
> v2:
> - fix typos
>
> CMakeLists.txt | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Index: tarantool.git/CMakeLists.txt
> ===================================================================
> --- tarantool.git.orig/CMakeLists.txt
> +++ tarantool.git/CMakeLists.txt
> @@ -137,7 +137,10 @@ check_function_exists(getprogname HAVE_G
> #
> # Enable 'make tags' target.
> #
> -add_custom_target(tags COMMAND ${CTAGS} -R -f tags
> +list(APPEND tagsExclude "--exclude=.git/*")
Great!
> +list(APPEND tagsExclude "--exclude=.pc/*")
What's in '.pc'?
> +list(APPEND tagsExclude "--exclude=patches/*")
> +add_custom_target(tags COMMAND ${CTAGS} -R ${tagsExclude} -f tags
> WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
> add_custom_target(ctags DEPENDS tags)
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [tarantool-patches] [PATCH v2] build: tags -- Exclude unneeded directories
2019-03-04 9:57 ` Vladimir Davydov
@ 2019-03-04 10:09 ` Cyrill Gorcunov
2019-03-04 10:15 ` Vladimir Davydov
0 siblings, 1 reply; 8+ messages in thread
From: Cyrill Gorcunov @ 2019-03-04 10:09 UTC (permalink / raw)
To: Vladimir Davydov; +Cc: tarantool
On Mon, Mar 04, 2019 at 12:57:34PM +0300, Vladimir Davydov wrote:
> > -add_custom_target(tags COMMAND ${CTAGS} -R -f tags
> > +list(APPEND tagsExclude "--exclude=.git/*")
>
> Great!
>
> > +list(APPEND tagsExclude "--exclude=.pc/*")
>
> What's in '.pc'?
quilt uses it to stack data. Guys, maybe we should simply
tag src/ directory only? Or there someone who is using
tags for tests, third party and etc?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [tarantool-patches] [PATCH v2] build: tags -- Exclude unneeded directories
2019-03-04 10:09 ` Cyrill Gorcunov
@ 2019-03-04 10:15 ` Vladimir Davydov
2019-03-04 10:32 ` Cyrill Gorcunov
0 siblings, 1 reply; 8+ messages in thread
From: Vladimir Davydov @ 2019-03-04 10:15 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: tarantool
On Mon, Mar 04, 2019 at 01:09:43PM +0300, Cyrill Gorcunov wrote:
> On Mon, Mar 04, 2019 at 12:57:34PM +0300, Vladimir Davydov wrote:
> > > -add_custom_target(tags COMMAND ${CTAGS} -R -f tags
> > > +list(APPEND tagsExclude "--exclude=.git/*")
> >
> > Great!
> >
> > > +list(APPEND tagsExclude "--exclude=.pc/*")
> >
> > What's in '.pc'?
>
> quilt uses it to stack data.
AFAIK ctags will simply ignore those. It doesn't tag anything in .git
either. Come to think of it, do we really need to explicitly exclude
those dirs?
> Guys, maybe we should simply tag src/ directory only? Or there someone
> who is using tags for tests, third party and etc?
Tagging third_party is useful. We even patch those sometimes.
I'm not sure why it's not in src/ though.
Tagging tests is mostly useless, you're correct, but it doesn't hurt
much.
There's also a bunch of autogenerated files (e.g. *.lua.c and module.h).
I wonder if it makes sense to tag those. I guess it does.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [tarantool-patches] [PATCH v2] build: tags -- Exclude unneeded directories
2019-03-04 10:15 ` Vladimir Davydov
@ 2019-03-04 10:32 ` Cyrill Gorcunov
0 siblings, 0 replies; 8+ messages in thread
From: Cyrill Gorcunov @ 2019-03-04 10:32 UTC (permalink / raw)
To: Vladimir Davydov; +Cc: tarantool
On Mon, Mar 04, 2019 at 01:15:36PM +0300, Vladimir Davydov wrote:
> > >
> > > > +list(APPEND tagsExclude "--exclude=.pc/*")
> > >
> > > What's in '.pc'?
> >
> > quilt uses it to stack data.
>
> AFAIK ctags will simply ignore those. It doesn't tag anything in .git
> either. Come to think of it, do we really need to explicitly exclude
> those dirs?
yes we should, simply because it is pointless to force ctags to scan
directory where we _know_ no useful data present, so it will process
a bit faster.
as to .pc -- quilt pushes there original .c|.h when a patch applied,
so this generates unrelated tags and should be excluded from scanning.
> > Guys, maybe we should simply tag src/ directory only? Or there someone
> > who is using tags for tests, third party and etc?
>
> Tagging third_party is useful. We even patch those sometimes.
> I'm not sure why it's not in src/ though.
>
> Tagging tests is mostly useless, you're correct, but it doesn't hurt
> much.
until one day :) but I don't insist
> There's also a bunch of autogenerated files (e.g. *.lua.c and module.h).
> I wonder if it makes sense to tag those. I guess it does.
I think the same
Cyrill
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [tarantool-patches] [PATCH v2] build: tags -- Exclude unneeded directories
2019-03-02 15:40 ` [tarantool-patches] [PATCH v2] " Cyrill Gorcunov
2019-03-04 9:57 ` Vladimir Davydov
@ 2019-03-04 15:44 ` Vladimir Davydov
1 sibling, 0 replies; 8+ messages in thread
From: Vladimir Davydov @ 2019-03-04 15:44 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: tarantool
Pushed to 2.1. Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-03-04 15:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-02 14:44 [tarantool-patches] [PATCH] build: tags -- Exclude unneeded directories Cyrill Gorcunov
2019-03-02 15:10 ` [tarantool-patches] " Cyrill Gorcunov
2019-03-02 15:40 ` [tarantool-patches] [PATCH v2] " Cyrill Gorcunov
2019-03-04 9:57 ` Vladimir Davydov
2019-03-04 10:09 ` Cyrill Gorcunov
2019-03-04 10:15 ` Vladimir Davydov
2019-03-04 10:32 ` Cyrill Gorcunov
2019-03-04 15:44 ` Vladimir Davydov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox