Coder Social home page Coder Social logo

universal-ctags / python-ctags3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sbraz/python-ctags

33.0 33.0 10.0 197 KB

Actively maintained fork of python-ctags with Python 3 support

License: GNU Lesser General Public License v3.0

Python 11.61% C 72.36% Makefile 0.75% Cython 15.28%

python-ctags3's People

Contributors

hddmet avatar jonashaag avatar masatake avatar sbraz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-ctags3's Issues

No Clear documentation to fetch key-value pairs from python.

AllocBuffer rpc/impl.c/^void AllocBuffer(MESSAGE_BUFFER_S *const MsgBuffer, uint32_t opCode, $/;" f line:502 typeref:typename:void end:516 <--------- This param

Here, I am interested in fetching the "end" parameter from the lines where it is present, but the python examples and documentation do not present any option to do so.

SegFault on OSX

First, many thanks for maintaining this library, it is proving very useful for the application I am developing. I have had a few issues with the library when running on OSX though. I am using the linux kernel 4.4.0 source as test data and it had issues when processing the tags of drivers/dma/at_hdma.c. I have narrowed it down to a single line in the tag file which I have attached below (that's not to say that other lines don't suffer the same fate). The issue only appears to affect the library when installed using pip3 (installing version v1.2.3), the issue is not present when installed using the makefile from cloning the git repository.

The segfault occurs inside the strncmp call in parseTagLine. Comparing the function in v1.2.3 and the head, it looks like the logic has been changed to use a new function countContinuousBackslashesBackward. Are there plans to release a new version containing this fix which can be installed using pip3 rather than by cloning the repo? Is there any errata to which this defective edge case could be added so that others can quickly identify should they encounter the same problem?

test.txt

Integrate upstream test suite

I added a new test suite under the tests/ directory; however I just noticed there's a test suite under src/tests/. Merge the two and integrate them into Travis.

Back slash handling

Double backslashes at the end of pattern can crash readtags.c.

[yamato@x201]~/var/python-ctags3/src/examples% git diff tags            
diff --git a/src/examples/tags b/src/examples/tags
index 02ebfd5..70e5d33 100644
--- a/src/examples/tags
+++ b/src/examples/tags
@@ -281,7 +281,7 @@ file        ../include/readtags.h   /^      const char *file;$/;"   kind:member     line:112        languag
 file   ../include/readtags.h   /^      } file;$/;"     kind:member     line:72 language:C++    struct:__anon9  typeref:struct:__anon9::__anon11        access:public
 fileScope      ../include/readtags.h   /^      short fileScope;$/;"    kind:member     line:129        language:C++    struct:__anon14 access:public
 find   ../readtags.c   /^static tagResult find (tagFile *const file, tagEntry *const entry,$/;"        kind:function   line:649        language:C      file:   signature:(tagFile *const file, tagEntry *const entry, const char *const name, const int options)
-findBinary     ../readtags.c   /^static tagResult findBinary (tagFile *const file)$/;" kind:function   line:592        language:C      file:   signature:(tagFile *const file)
+findBinary     ../readtags.c   /^static tagResult findBinary (tagFile *const file)\\/;"        kind:function   line:592        language:C      file:   signature:(tagFile *const file)
 findFirstMatchBefore   ../readtags.c   /^static tagResult findFirstMatchBefore (tagFile *const file)$/;"       kind:function   line:577        language:C      file:   signature:(tagFile *const file)
 findFirstNonMatchBefore        ../readtags.c   /^static void findFirstNonMatchBefore (tagFile *const file)$/;" kind:function   line:559        language:C      file:   signature:(tagFile *const file)
 findNext       ../readtags.c   /^static tagResult findNext (tagFile *const file, tagEntry *const entry)$/;"    kind:function   line:689        language:C      file:   signature:(tagFile *const file, tagEntry *const entry)
[yamato@x201]~/var/python-ctags3/src/examples% python ./example.py tags
Exuberant Ctags
Darren Hiebert
2
DL_EXPORT
macro
found
649
/^static tagResult find (tagFile *const file, tagEntry *const entry,$/
function
zsh: segmentation fault (core dumped)  python ./example.py tags

This is spotted at universal-ctags project(http://ctags.io) and I fixed this bug.
If this bug is reproduced in python-ctags3, could you consider to cherry-pick universal-ctags/ctags@42d50f3 ?

Tag 1.2.4 on GH

Hi Jonas, it seems you forgot to push the commit which adds version 1.2.4 to setup.py and the associated tag. Can you do it?

Rebuild with Python 3.11 support to fix "fatal error: longintrepr.h: No such file or directory"

Hi @jonashaag,
The current PyPI tarball doesn't work with Python 3.11:

x86_64-pc-linux-gnu-gcc -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fPIC -Isrc/include -I/usr/include/python3.11 -c src/_readtags.c -o build/temp.linux-x86_64-cpython-311/src/_readtags.o
src/_readtags.c:196:12: fatal error: longintrepr.h: No such file or directory
  196 |   #include "longintrepr.h"
      |            ^~~~~~~~~~~~~~~

Regenerating _readtags.c with a recent Cython version works, can you please do it and upload a new release on PyPI?

Migrate CI to GHA

Travis doesn't work anymore, we don't have functional CI right now.

I don't have time to work on this right now.

Move to universal-ctags

HI, again.

Not to force a person like you extracting readtags.c from the ctags repository when I change readtags.c, I made a separated repository for readtags.c spin-off'ed from the ctags repository. Please, see https://github.com/universal-ctags/libreadtags .

I think python-ctags3 is not enough major for its great usefulness. Many people though tags file can be used via vim or editors. They don't know interesting command line based application like universal-ctags/ctags#3043 .

How do you think running this repo at Universal Ctags organization (https://github.com/universal-ctags) ?

universal-ctags becomes popular. So more people may visit the organization page and find python-ctags3.
It means you will find more bug reports but you may get contributions.

Note: even if you use readtags.c of the libreadtags, you can read a tags file generated by Exuberant Ctags.

I'm not good at English. So forgive me if I use impolite expressions.

Originally posted by @masatake in #7 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.