Skip to content
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

No way to list keymap component dependencies #390

Open
wismill opened this issue Oct 25, 2023 · 3 comments
Open

No way to list keymap component dependencies #390

wismill opened this issue Oct 25, 2023 · 3 comments
Assignees
Labels
cli compile-keymap Indicates a need for improvements or additions to keymap compilation enhancement Indicates new feature requests needs info testing Indicates a need for improvements or additions to testing
Milestone

Comments

@wismill
Copy link
Member

wismill commented Oct 25, 2023

Currently there is no way to do the following in xkeyboard-config:

  • Detect dead code, i.e. the code not used in rules or in the dependencies of the code referenced in rules.
  • List the dependencies (i.e. includes) of each components. This would facilitate debugging and also help for impact assessment before editing keymaps components.

We could create internal API/developer tools to deal with it.

@wismill wismill added enhancement Indicates new feature requests testing Indicates a need for improvements or additions to testing compile-keymap Indicates a need for improvements or additions to keymap compilation needs info cli labels Oct 25, 2023
@whot
Copy link
Contributor

whot commented Oct 26, 2023

fwiw, xkeyboard-config has the symbols-tree.py script which does the latter, at least in one direction. I tried to refactor it once to get it to work in the other direction ("what includes foo(bar)") but gave up, didn't really have the need at the time.

It's not a full XKB parser either but probably does the job for the use-case here - I guess 90% is good enough here ;)

I think this is more an issue for xkeyboard-config rather than libxkbcommon. theoretically we support multiple backend formats and I don't think having a public API for this is useful. Developer tools - maybe? I mean we always want more toys to play with, right? :)

@wismill
Copy link
Member Author

wismill commented Oct 26, 2023

I think this is more an issue for xkeyboard-config rather than libxkbcommon.

@whot This is the primary use case. But any keymap developer may find this feature useful for debugging (I do!).

theoretically we support multiple backend formats and I don't think having a public API for this is useful

Agreed, but let’s be honest: AFAIK, nobody works on XKB2 or an alternative format. And transitioning to an hypothetical new format would still imply using the old format for years.

I proposed an internal API, not a public one. It would used by a new developer (i.e. not installed) tool.

This proposal is motivated by recent issues in xkeyboard-config related to includes. I would like to provide the maintainers tools to avoid them, for local use and in the CI.

@wismill wismill added this to the 1.7.0 milestone Oct 26, 2023
@wismill wismill self-assigned this Oct 26, 2023
@whot
Copy link
Contributor

whot commented Oct 26, 2023

XKB2 will be called Godot :)

@wismill wismill modified the milestones: 1.7.0, 1.8.0 Feb 8, 2024
@wismill wismill modified the milestones: 1.8.0, 1.9.0 Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli compile-keymap Indicates a need for improvements or additions to keymap compilation enhancement Indicates new feature requests needs info testing Indicates a need for improvements or additions to testing
Projects
None yet
Development

No branches or pull requests

2 participants