Comments (4)
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.
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.
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.
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)
- Offline search results differ from internet
- Proposal: add a mode that displays a popup on identifier click HOT 3
- Inline reference preview/lists are broken HOT 12
- adding Apache NuttX RTOS
- CSS: horizontal scrolling issue with very long lines HOT 6
- Improve indexing of Zephyr
- Improve devicetree file navigation HOT 6
- Android kernel & bionic on elixir.bootlin.com HOT 1
- Add systemd source code HOT 1
- script.sh: Can't find repository HOT 3
- Ability to get raw file HOT 3
- Improve indexing performance (`update.py`) HOT 3
- Move from bsddb3 to berkeleydb HOT 1
- Comments in assembler files for some architectures are indexed as identifiers HOT 3
- Inconsistent number of references if update job is ran for multiple tags at once HOT 5
- Searching for an ident with slash gives blank page
- Searching for filepath could redirect to this path
- cgi and cgitb dependencies are deprecated HOT 1
- Avoid using Perl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elixir.