"Identifier not used" is weird, replace it by "unknown identifier" and
give the search identifier name in the header.
Also improve the autocomplete comment. Make it human-friendly and
explain why people got autocompleted to a symbol that does not exist.
Also, only show it if the symbol actually exists. That way we only
tell "maybe autocomplete lead you here" only in cases where
autocomplete can actually lead you here.
To test this feature:
- search for any random symbol, you'll see "Unknown identifier '...'"
- search for a symbol that exists in another version as the selected
one. For example __NR_epoll_pwait2 appeared in musl v1.2.5. You'll
see the same header message plus a comment about how the symbol
exists in another version.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
If we press enter without any search value, we get directed to
/$PROJECT/$VERSION/A/ident/ which is a "400 Bad Request".
As the search input is selected by default, this is any enter press
where the focus hasn't changed.
`required` documentation:
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/required
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
OpenSBI uses `.mk` files. The tokenizer does not get ran on files
without a family (sad). Adding this means we index references
inside .mk files, eg:
# opensbi/lib/utils/i2c/objects.mk
libsbiutils-objs-$(CONFIG_I2C) += i2c/i2c.o
Also, refactor the getFileFamily():
- All usage of name/ext do a .lower() on them, move it to the top.
- Use `x == "A"` checks rather than `x in ["A"]`.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
We had an hardcoded mobile banner that was nice looking but couldn't
deal with all the content for the various banners we want to display.
Also, it was a separate element to the desktop one. Unify them as a
single element that adapts (as it should) to desktop or mobile
viewports.
Take the pm_ptr() macro as example:
⟩ ctags -x --kinds-c=+p+x --extras='-{anonymous}' include/linux/pm.h | grep pm_ptr
pm_ptr macro 475 include/linux/pm.h #define pm_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM), (_ptr))
The previous grep would remove the pm_ptr() line because it contains
CONFIG_. We only want to remove a line if it starts with CONFIG_.
Testing this commit:
⟩ export LXR_REPO_DIR=...
⟩ hash=97b0e23363c8283f53c361d8129ef90d7a2b9350
⟩ ./script.sh parse-defs $hash pm.h C | sort > /tmp/defs-pm-before.txt
⟩ # TODO: apply commit
⟩ ./script.sh parse-defs $hash pm.h C | sort > /tmp/defs-pm-after.txt
⟩ comm -13 /tmp/defs-pm-before.txt /tmp/defs-pm-after.txt
pm_ptr macro 475
pm_sleep_ptr macro 476
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Examples:
/musl/v1.2.5/sourc
/musl/v1.2.5/sourc/
/musl/v1.2.5/sourc/asd
/musl/v1.2.5/sourc/asd/
/musl/v1.2.5/sourc/asd/zxc
/musl/v1.2.5/sourc/asd/zxc/
/musl/v1.2.5/sourc/asd/zxc/...
Falcon requires field names on one level to be the same on all
(matching?) paths.
On my machine, a `docker build` after any file change is:
- Before this patch: 7.29s
- Afterwards: 2.18s
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
This changes the stdout/stderr buffering behavior of Python. Without it,
indexing scripts don't stream updates and use really big buffers.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>