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

modules/gnome: Allow to specify the doc-format argument #14283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tintou
Copy link
Contributor

@tintou tintou commented Feb 20, 2025

Add the support for the doc-format argument if g-ir-scanner supports it.

Ignore the argument otherwise as this is a no-op in such cases.

@tintou tintou requested a review from jpakkane as a code owner February 20, 2025 21:15
@tintou
Copy link
Contributor Author

tintou commented Feb 20, 2025

Comment on lines 1213 to 1214
if kwargs['doc_format'] and self._gir_has_option('--doc-format'):
scan_command += ['--doc-format', kwargs['doc_format']]
Copy link
Member

Choose a reason for hiding this comment

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

When checking if it has been set, it should "probably" be is not None because someone could do

gnome.generate_gir(
    ...,
    doc_format: '',
)

and it's not clear what should happen then ignoring an explicitly specified value even if "'weird", feels strange to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the is not None check,

The value is just a hint that get inserted into the generated .gir file so it is safe to be ignored if the scanner doesn't support it

Add the support for the doc-format argument if g-ir-scanner supports it.

Ignore the argument otherwise as this is a no-op in such cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants