-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-39144 Align ctags and etags behaviours and include Python stdlib files #17721
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
Conversation
- make TAGS to reset tags file - make TAGS to include Modules/_ctypes
Makefile.pre.in
Outdated
@@ -1730,13 +1730,17 @@ tags:: | |||
ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h | |||
for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done | |||
ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch] | |||
find $(srcdir)/Lib -type f -name "*.py" -not -name "test_*.py" -not -path "*/test/*" | ctags -f tags -w -a -L - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still will pick up some stuff that is not likely wanted, for example, the contents of Lib/lib2to3/tests
. Also, some packages have the test folder inside like Lib/unittest/test/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will exclude them in 4681826
Makefile.pre.in
Outdated
LC_ALL=C sort -o tags tags | ||
|
||
# Create a tags file for GNU Emacs | ||
TAGS:: | ||
touch tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this line? If I invoke the makefile from another place won't this create a 'tags' file in my current working directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
etags -a
appends to the current tags, (regardless of whats in it), if you run make tags
and make TAGS
you'll end up with a corrupted file.
the make tags
commands will find the first pass without the -a
append, so it resets the file. I'll update this to run in a different order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 7e31b49
Exclude /*_test/ and /tests/ directories
@pablogsal please re-review |
For reference, these are the files that will be indexed by
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks @tonybaloney for the PR! 🎉
Thanks @tonybaloney for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
GH-17722 is a backport of this pull request to the 3.8 branch. |
GH-17723 is a backport of this pull request to the 3.7 branch. |
…e Python stdlib files (pythonGH-17721) (cherry picked from commit ef7eaaf) Co-authored-by: Anthony Shaw <[email protected]>
…e Python stdlib files (GH-17721) (cherry picked from commit ef7eaaf) Co-authored-by: Anthony Shaw <[email protected]>
…e Python stdlib files (GH-17721) (cherry picked from commit ef7eaaf) Co-authored-by: Anthony Shaw <[email protected]>
…e Python stdlib files (pythonGH-17721)
make tags
andmake TAGS
to both include Python standard library filesmake TAGS
to reset tags file, asmake tags
does (implicitly)make TAGS
to include Modules/_ctypes asmake tags
doeshttps://bugs.python.org/issue39144