Giter Club home page Giter Club logo

Comments (4)

tleb avatar tleb commented on July 17, 2024

Good catch. Locally, ctags appears to return the right thing:

⟩ export LXR_REPO_DIR="/absolute/path/to/linux"

⟩ cd $LXR_REPO_DIR

⟩ git ls-tree v6.8 arch/powerpc/include/asm/bug.h
100644 blob 1db485aacbd9b7c4e77847dbcb5e112ebb011ab2	arch/powerpc/include/asm/bug.h

⟩ $elixir_path/script.sh parse-defs \
		1db485aacbd9b7c4e77847dbcb5e112ebb011ab2 foo.c C | \
	grep __WARN_FLAGS
__WARN_FLAGS macro 75

⟩ ctags --version
Universal Ctags 6.1.0(v6.1.0), Copyright (C) 2015-2023 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Dec 28 2023, 18:49:35
  URL: https://ctags.io/
  Output version: 0.0
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory,
                +xpath, +json, +interactive, +sandbox, +yaml, +packcc, 
                +optscript, +pcre2

This does a call to parse_defs_C in script.sh that confirms my local ctags returns the right value. macro is the expected type for a macro declaration. There are many other possible reasons:

  • ctags version;
  • bug that modifies the entry type;
  • corrupted entry in the database;
  • etc.

Digging deeper is required.

from elixir.

fstachura avatar fstachura commented on July 17, 2024

parse-defs also returns wrong data on my local docker instance. (older kernel tag but that does not matter https://elixir.bootlin.com/linux/v6.1/A/ident/__WARN_FLAGS).

root@80a0a2bce64f:/srv/elixir-data/linux/repo# git ls-tree v6.1 arch/powerpc/include/asm/bug.h
100644 blob 61a4736355c244448104080e144631a3cb8839b2    arch/powerpc/include/asm/bug.h
root@80a0a2bce64f:/srv/elixir-data/linux/repo# cd /usr/local/elixir/
root@80a0a2bce64f:/usr/local/elixir# ./script.sh parse-defs 61a4736355c244448104080e144631a3cb8839b2 foo.c C
_ASM_POWERPC_BUG_H macro 3
_exception prototype 165
_exception_pkey prototype 166
bad_page_fault prototype 164
die prototype 167
die_mce prototype 168
die_will_crash prototype 169
hash__do_page_fault prototype 163
panic_flush_kmsg_end prototype 171
panic_flush_kmsg_start prototype 170

I suspect ctags version is the issue. Ctags in the debian docker image is pinned to a rather old version and perhaps the same applies to production.
Manually upgrading ctags to the latest nightly version seems to fix the issue (not that I advocate using nightly on prod, since there exists a stable release that also works). ctags included in Debian Bookworm repos seems to be too old.

from elixir.

tleb avatar tleb commented on July 17, 2024

Thanks for the check using the old ctags version. I remember this version is patched for a reason, @michaelopdenacker will be able to tell us more about why. Upgrading it makes sense. The question will be if we still need custom patches on top or if we can use upstream.

from elixir.

fstachura avatar fstachura commented on July 17, 2024

This commit suggests, that the changes from the special ctags version were upstreamed.

The packages should probably be removed from the Dockerfile, same with pygments.

from elixir.

Related Issues (20)

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.