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

Messages (part 2) #379

Merged
merged 2 commits into from
Sep 24, 2023
Merged

Messages (part 2) #379

merged 2 commits into from
Sep 24, 2023

Conversation

wismill
Copy link
Member

@wismill wismill commented Sep 21, 2023

Follow-up of #332

  • Merge log functions with and without message code.
  • Add more messages entries.

@wismill wismill added the documentation Indicates a need for improvements or additions to documentation label Sep 21, 2023
@wismill wismill added this to the 1.6.0 milestone Sep 21, 2023
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work. Everything looks good to me.

src/messages-codes.h.jinja Outdated Show resolved Hide resolved
This commit is another step to identify and document the maximum number
of logging messages. Bulk changes:

- Rename `conflicting-key-type` to `conflicting-key-type-merging-groups`.
  Giving more context in the name allow us to introduce
  `conflicting-key-type-definitions` later.
- Add conflicting-key-type-definitions
- Add conflicting-key-type-map-entry
- Add undeclared-modifiers-in-key-type
  Also improve the log messages.
- Add conflicting-key-type-preserve-entries
- Use XKB_ERROR_UNSUPPORTED_MODIFIER_MASK
- Add illegal-key-type-preserve-result
- Add conflicting-key-type-level-names
- Add duplicate-entry
- Add unsupported-symbols-field
- Add missing-symbols-group-name-index
- Use XKB_ERROR_WRONG_FIELD_TYPE
- Add conflicting-key-name
- Use XKB_WARNING_UNDEFINED_KEYCODE
- Add illegal-keycode-alias
- Add unsupported-geometry-section
- Add missing-default-section
- Add XKB_LOG_MESSAGE_NO_ID
- Rename log_vrb_with_code to log_vrb
- Use ERROR_WRONG_FIELD_TYPE & ERROR_INVALID_SYNTAX
- Add unknown-identifier
- Add invalid-expression-type
- Add invalid-operation + fixes
- Add unknown-operator
- Rename ERROR_UNKNOWN_IDENTIFIER to ERROR_INVALID_IDENTIFIER
- Add undeclared-virtual-modifier
- Add expected-array-entry
- Add invalid-include-statement
- Add included-file-not-found
- Add allocation-error
- Add invalid-included-file
- Process symbols.c
- Add invalid-value
- Add invalid-real-modifier
- Add unknown-field
- Add wrong-scope
- Add invalid-modmap-entry
- Add wrong-statement-type
- Add conflicting-key-symbols-entry
- Add invalid-set-default-statement
Previously we had two types of macros for logging: with and without
message code. They were intended to be merged afterwards.

The idea is to use a special code – `XKB_LOG_MESSAGE_NO_ID = 0` – that
should *not* be displayed. But we would like to avoid checking this
special code at run time. This is achieved using macro tricks; they
are detailed in the code (see: `PREPEND_MESSAGE_ID`).

Now it is also easier to spot the remaining undocumented log entries:
just search `XKB_LOG_MESSAGE_NO_ID`.
@wismill wismill marked this pull request as ready for review September 24, 2023 07:08
@wismill
Copy link
Member Author

wismill commented Sep 24, 2023

Applied review fixes and rework the commit messages.

Let’s merge and continue work in a follow-up PR, as this one has already a big diff.

@wismill wismill merged commit c0065c9 into xkbcommon:master Sep 24, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Indicates a need for improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants